|
Evolvica Core API Version 0.6.2 Last Modified: June 29 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for a set of individuals. Implementing classes are used to hold several individuals together in a collection. In principle this interface is much the same as specified in java.util.Collection, however it has been modified to avoid adding other objects than individuals. Only the most important methods from java.util.Collection have been incorporated, but other methods may be added in the future (i.e. retainAll()). Note: The name set does not specify the underlying data structure, it has only been used because the word set is shorter than the word collection.
Method Summary | |
void |
add(IIndividual ind)
Adds an individual to this set. |
void |
add(IIndividual[] indArray)
Adds the individuals from the array to this set. |
void |
clear()
Removes all individuals from this set. |
boolean |
contains(IIndividual ind)
Checks if the given individual is already contained in this set. |
boolean |
isEmpty()
Checks if this set is empty. |
ISetIterator |
iterator()
Returns an iterator over this set. |
void |
remove(IIndividual ind)
Removes the given individual from this set, if it contained in the set. |
void |
remove(IIndividual[] indArray)
Removes all individuals in the given array from this set. |
int |
size()
Returns the number of individuals contained in this set. |
IIndividual[] |
toArray()
Returns the contents of this set as an array. |
Method Detail |
public void add(IIndividual ind)
ind
- individual to be addedpublic void add(IIndividual[] indArray)
indArray
- array with individuals to be addedpublic void clear()
public boolean contains(IIndividual ind)
ind
- individual that should be checked
public boolean isEmpty()
public ISetIterator iterator()
public void remove(IIndividual ind)
ind
- individual to be removed from this setpublic void remove(IIndividual[] indArray)
indArray
- array with individuals to be removedpublic int size()
public IIndividual[] toArray()
|
Evolvica Core API Version 0.6.2 Last Modified: June 29 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |