Class GInt
- All Implemented Interfaces:
Serializable
,Iterable<Integer>
,Collection<Integer>
,List<Integer>
Integer List that can be used to compute score of an anthill.
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGInt()
Create an empty int list.GInt(Fourmiliere fere)
Create a score GInt from an anthill. -
Method Summary
Modifier and TypeMethodDescriptionint
computeScore(Fourmiliere fere)
Return score of an anthill from this.int
getCase(int ca)
Return an element of this.Methods inherited from class fr.formiko.usuel.structures.listes.Liste
add, add, add, addAll, addAll, addHead, addList, addSorted, addTail, clear, contains, containsAll, equals, filter, get, getFirst, getHead, getItem, getLast, getMost, getTail, indexOf, isEmpty, iterator, lastIndexOf, length, listIterator, listIterator, pop, push, push, remove, remove, removeAll, removeDuplicateItem, removeItem, retainAll, set, setHead, setTail, size, sort, subList, toArray, toArray, toGString, toString, toStringId, toStringLong, updateTail
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
hashCode, replaceAll, spliterator
-
Constructor Details
-
GInt
public GInt()Create an empty int list. -
GInt
Create a score GInt from an anthill.- Parameters:
fere
- the anthill that we want the score
-
-
Method Details
-
computeScore
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.
-