Documentation of 'org.jgap.impl.ChainOfSelectors' Java class
ChainOfSelectors
org.jgap.impl

Class ChainOfSelectors

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, ICloneable


    public class ChainOfSelectors
    extends java.lang.Object
    implements java.io.Serializable, ICloneable, java.lang.Comparable
    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
    See Also:
    Configuration, Genotype, Serialized Form
    • Constructor Detail

      • ChainOfSelectors

        public ChainOfSelectors()
        Only for dynamic instantiation.
        Since:
        3.2
      • ChainOfSelectors

        public ChainOfSelectors(Configuration a_conf)
    • Method Detail

      • 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()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals(java.lang.Object a_obj)
        Overrides:
        equals in class java.lang.Object
        Parameters:
        a_obj - Object
        Returns:
        boolean
        Since:
        1.1
      • get

        public NaturalSelector get(int a_index)
        Returns a Selector with specific index in the list.
        Parameters:
        a_index - the index of the Selector to read from the list
        Returns:
        NaturalSelector
        Since:
        1.1
      • clear

        public void clear()
        Clears all registered selectors.
        Since:
        1.1
      • iterator

        public java.util.Iterator iterator()
        Returns:
        Iterator for iterating over list of selectors
        Since:
        1.1
      • clone

        public java.lang.Object clone()
        Specified by:
        clone in interface ICloneable
        Overrides:
        clone in class java.lang.Object
        Returns:
        deep clone of this instance
        Since:
        3.2
      • compareTo

        public int compareTo(java.lang.Object a_other)
        The compareTo-method. Here we simply compare the class names of the contained selectors as INaturalSelector does not contain interface Comparable.
        Specified by:
        compareTo in interface java.lang.Comparable
        Parameters:
        a_other - the other object to compare
        Returns:
        -1, 0, 1
        Since:
        3.2

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.