Package io.jenetics

Enum BitGene

    • Method Detail

      • values

        public static BitGene[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (BitGene c : BitGene.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static BitGene valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • bit

        public final boolean bit()
        Return the value of the BitGene.
        Returns:
        The value of the BitGene.
        See Also:
        allele(), booleanValue()
      • booleanValue

        public boolean booleanValue()
        Return the boolean value of this gene.
        Returns:
        the boolean value of this gene.
        See Also:
        allele(), bit()
      • isValid

        public boolean isValid()
        Return always true.
        Specified by:
        isValid in interface Verifiable
        Returns:
        always true
      • of

        public static BitGene of​(boolean value)
        Return the corresponding BitGene for the given boolean value.
        Parameters:
        value - the value of the returned BitGene.
        Returns:
        the BitGene for the given boolean value.