java.lang.Object
fr.formiko.usuel.structures.listes.Liste<Integer>
fr.formiko.usuel.structures.listes.GInt
All Implemented Interfaces:
Serializable, Iterable<Integer>, Collection<Integer>, List<Integer>

public class GInt extends Liste<Integer> implements Serializable
Integer List that can be used to compute score of an anthill.
See Also:
Serialized Form
  • Constructor Details

    • GInt

      public GInt()
      Create an empty int list.
    • GInt

      public GInt(Fourmiliere fere)
      Create a score GInt from an anthill.
      Parameters:
      fere - the anthill that we want the score
  • Method Details

    • computeScore

      public int computeScore(Fourmiliere fere)
      Return score of an anthill from this. We assume that this have been created with an anthill as parameter
      Parameters:
      fere - the anthill that we want the score
      Returns:
      the computed score
    • getCase

      public int getCase(int ca)
      Return an element of this.
      Parameters:
      ca - id of the element
      Returns:
      the ca element of the GInt, or 0 if not found.