|
eaLib API Docs Last Modified : January 7 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for a stream of individuals.
Field Summary | |
static long |
serialVersionUID
Serialization version identifier. |
Method Summary | |
void |
add(Individual i)
Puts an individual to the stream at the current position. |
void |
add(Individual i,
int index)
Adds an individual to a specific position in the stream. |
void |
append(Individual i)
Puts an individual to the end of the stream. |
void |
empty()
Removes all individuals from this stream. |
Individual |
get(int index)
Gets an individual from a specific position in the stream. |
boolean |
hasNext()
Indicates that there is a next individual at the current pointer position. |
boolean |
hasPrevious()
Indicates that there is a previous individual at the current pointer position. |
Individual |
next()
Gets the next individual from the current position in the stream. |
Individual |
previous()
Gets the previous individual from the current position in the stream. |
void |
reset()
Sets the internal pointer before the first individual in the stream. |
void |
resetEnd()
Sets the internal pointer after the last individual in the stream. |
void |
resize(int size)
Resizes the stream. |
void |
set(Individual i,
int index)
Replaces an individual at a specific position with the given individual. |
int |
size()
Returns the size of the stream. |
Individual[] |
toArray()
Returns the contents of the stream as an array. |
Field Detail |
public static final long serialVersionUID
Method Detail |
public void empty()
public void add(Individual i)
i
- individual to addpublic void add(Individual i, int index)
i
- individual to addindex
- positionNoSuchElementException
- should be thrown in case of an illegal access, but must not be caughtpublic void append(Individual i)
i
- individual to appendpublic Individual get(int index)
index
- positionNoSuchElementException
- should be thrown in case of an illegal access, but must not be caughtpublic void set(Individual i, int index)
i
- individual to insert into streamindex
- position of replacementNoSuchElementException
- should be thrown in case of an illegal access, but must not be caughtpublic Individual next()
public boolean hasNext()
public Individual previous()
public boolean hasPrevious()
public void reset()
public void resetEnd()
public void resize(int size)
size
- size of streampublic int size()
public Individual[] toArray()
|
eaLib API Docs Last Modified : January 7 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |