Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.core
Class AbstractIndividualList

java.lang.Object
  extended byorg.evolvica.core.AbstractIndividualList
All Implemented Interfaces:
IIndividualSet, java.io.Serializable
Direct Known Subclasses:
IndividualArray, IndividualList

public abstract class AbstractIndividualList
extends java.lang.Object
implements IIndividualSet

Abstract base class for individual sets.

Since:
0.4.0
Version:
$Revision: 1.5 $ $Date: 2004/05/26 11:57:51 $
Author:
Andreas Rummler
See Also:
Serialized Form

Field Summary
protected  java.util.List list
          The underlying collection of individuals.
 
Constructor Summary
AbstractIndividualList()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

protected java.util.List list
The underlying collection of individuals.

Constructor Detail

AbstractIndividualList

public AbstractIndividualList()
Method Detail

add

public void add(IIndividual ind)
Description copied from interface: IIndividualSet
Adds an individual to this set.

Specified by:
add in interface IIndividualSet
Parameters:
ind - individual to be added
See Also:
IIndividualSet.add(org.evolvica.core.IIndividual)

add

public void add(IIndividual[] indArray)
Description copied from interface: IIndividualSet
Adds the individuals from the array to this set.

Specified by:
add in interface IIndividualSet
Parameters:
indArray - array with individuals to be added
See Also:
IIndividualSet.add(org.evolvica.core.IIndividual)

clear

public void clear()
Description copied from interface: IIndividualSet
Removes all individuals from this set.

Specified by:
clear in interface IIndividualSet
See Also:
IIndividualSet.clear()

contains

public boolean contains(IIndividual ind)
Description copied from interface: IIndividualSet
Checks if the given individual is already contained in this set.

Specified by:
contains in interface IIndividualSet
Parameters:
ind - individual that should be checked
Returns:
true if the given individual is contained in this set, false otherwise
See Also:
IIndividualSet.contains(org.evolvica.core.IIndividual)

isEmpty

public boolean isEmpty()
Description copied from interface: IIndividualSet
Checks if this set is empty.

Specified by:
isEmpty in interface IIndividualSet
Returns:
true if this set does not contain any individuals, false otherwise
See Also:
IIndividualSet.isEmpty()

iterator

public ISetIterator iterator()
Description copied from interface: IIndividualSet
Returns an iterator over this set.

Specified by:
iterator in interface IIndividualSet
Returns:
iterator for this set
See Also:
IIndividualSet.iterator()

remove

public void remove(IIndividual ind)
Description copied from interface: IIndividualSet
Removes the given individual from this set, if it contained in the set.

Specified by:
remove in interface IIndividualSet
Parameters:
ind - individual to be removed from this set
See Also:
IIndividualSet.remove(org.evolvica.core.IIndividual)

remove

public void remove(IIndividual[] indArray)
Description copied from interface: IIndividualSet
Removes all individuals in the given array from this set.

Specified by:
remove in interface IIndividualSet
Parameters:
indArray - array with individuals to be removed
See Also:
IIndividualSet.remove(org.evolvica.core.IIndividual)

size

public int size()
Description copied from interface: IIndividualSet
Returns the number of individuals contained in this set.

Specified by:
size in interface IIndividualSet
Returns:
size of the set
See Also:
IIndividualSet.size()

toArray

public IIndividual[] toArray()
Description copied from interface: IIndividualSet
Returns the contents of this set as an array.

Specified by:
toArray in interface IIndividualSet
Returns:
array containing the individuals of this set
See Also:
IIndividualSet.toArray()

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems