Package fr.formiko.formiko
Class GIndividu
java.lang.Object
fr.formiko.usual.structures.listes.Liste<Individu>
fr.formiko.formiko.GIndividu
- All Implemented Interfaces:
Serializable
,Iterable<Individu>
,Collection<Individu>
,List<Individu>
public class GIndividu
extends fr.formiko.usual.structures.listes.Liste<Individu>
implements Serializable
List of Individu.
- Author:
- Hydrolien
- See Also:
-
Field Summary
Fields inherited from class fr.formiko.usual.structures.listes.Liste
head, tail
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static Individu
createIndividu
(String csvFileLine, String[] tDefault) Create an individu from a .csv file line.int[]
Return all the aviable type in this GIndividu.getIndividuByType
(byte type) Return the individu corresponding to type.getIndividuByType
(int type) static void
Load the individu from a File.Methods inherited from class fr.formiko.usual.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, 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
-
GIndividu
public GIndividu()
-
-
Method Details
-
getIndividuByType
Return the individu corresponding to type.
There is only 1 (or 0) individu for every type.- Parameters:
type
- type of the searched Individu.
-
getIndividuByType
-
getAviableType
public int[] getAviableType()Return all the aviable type in this GIndividu.- Returns:
- an array of int that contain all avaible type.
-
loadIndividus
public static void loadIndividus()Load the individu from a File.
File is .../stable/bin/Individu.csv -
createIndividu
Create an individu from a .csv file line.
tDefault is used to fill empty cell.- Parameters:
csvFileLine
- a scv file line sorted for Individu constructor.tDefault
- default value for the array.
-