org.jgap.impl
Class ChainOfSelectors
java.lang.Object
org.jgap.impl.ChainOfSelectors
- public class ChainOfSelectors
- extends java.lang.Object
Ordered chain of NaturalSelectors. With this container you can plugin
NaturalSelector implementations which will be performed either before (pre-)
or after (post-selectors) registered genetic operations have been applied.
- Since:
- 1.1
- Author:
- Klaus Meffert
- See Also:
Genotype,
Configuration
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
ChainOfSelectors
public ChainOfSelectors()
addNaturalSelector
public void addNaturalSelector(NaturalSelector a_selector)
throws InvalidConfigurationException
- Adds a natural selector to the chain
- Parameters:
a_selector - the selector to be added
- Throws:
InvalidConfigurationException- Since:
- 1.1 (previously part of class Configuration)
addAll
public void addAll(java.util.Collection c)
throws InvalidConfigurationException
- Parameters:
c - Collection
- Throws:
InvalidConfigurationException- Since:
- 1.1
size
public int size()
- Returns:
- number of selectors in list
- Since:
- 1.1 (previously part of class Configuration)
isEmpty
public boolean isEmpty()
- Returns:
- true if number of selectors is zero
- Since:
- 1.1
hashCode
public int hashCode()
equals
public boolean equals(java.lang.Object o)
- Parameters:
o - Object
- Returns:
- boolean
- Since:
- 1.1
get
public NaturalSelector get(int index)
- Returns a Selector with specific index in the list
- Parameters:
index - the index of the Selector to read from the list
- Returns:
- NaturalSelector
- Since:
- 1.1
clear
public void clear()
- Since:
- 1.1
iterator
public java.util.Iterator iterator()
- Returns:
- Iterator for iterating over list of selectors
- Since:
- 1.1