Module logicng

Enum Tristate

  • All Implemented Interfaces:
    Serializable, Comparable<Tristate>

    public enum Tristate
    extends Enum<Tristate>
    A tristate constant. This constant can have three different values: TRUE, FALSE, and UNDEF.
    Since:
    1.0
    Version:
    1.0
    • Enum Constant Detail

      • TRUE

        public static final Tristate TRUE
      • FALSE

        public static final Tristate FALSE
      • UNDEF

        public static final Tristate UNDEF
    • Method Detail

      • values

        public static Tristate[] 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 (Tristate c : Tristate.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Tristate 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
      • negate

        public static Tristate negate​(Tristate l)
        Returns the negation of a tristate constant.
        Parameters:
        l - the tristate constant
        Returns:
        the negation of the tristate constant
      • fromBool

        public static Tristate fromBool​(boolean b)
        Constructs a tristate constant from an ordinary Boolean value.
        Parameters:
        b - the Boolean value
        Returns:
        the tristate constant