|
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 classes where individuals are able to pass through. Gates are some kind of a combination of sources and sinks and act as buffers.
Method Summary | |
void |
add(Individual i)
Adds an individual to the sink. |
void |
add(Individual[] ia)
Adds an array of indiviualds to the sink. |
void |
add(IndividualStream is)
Adds a stream of individuals to the sink. |
Individual |
get(int index)
Get a single individual from the gate. |
IndividualStream |
getStream()
Deprecated. replaced by toStream() |
void |
remove(int index)
Removes an individual from the gate. |
void |
remove(int lowerIndex,
int upperIndex)
Removes several individuals from the gate. |
void |
removeAll()
Removes all individuals from the gate. |
int |
size()
Returns the current size of the gate. |
Individual[] |
toArray()
Returns the contents of the gate in an array. |
IndividualStream |
toStream()
Gets a stream of individuals from the gate. |
Method Detail |
public void add(Individual i)
i
- individual to addpublic void add(Individual[] ia)
ia
- array with individualspublic void add(IndividualStream is)
is
- stream of individualspublic Individual get(int index)
index
- index of individualpublic IndividualStream toStream()
public Individual[] toArray()
public IndividualStream getStream()
public void remove(int index)
index
- index of the individualpublic void remove(int lowerIndex, int upperIndex)
lowerIndex
- lower index (inclusive)upperIndex
- upper index (exclusive)public void removeAll()
public int size()
|
eaLib API Docs Last Modified : January 7 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |