Enum Bool

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Bool>

    public enum Bool
    extends java.lang.Enum<Bool>
    Three-valued (true, false, unknown) boolean type. The standard boolean operators are supported. The following truth table gives the results the unary negation operator:
        not
     T   F
     F   T
     U   U
     
    The truth table for boolean operators is as follows:
           and or
     T  T   T   T
     T  F   F   T
     T  U   U   T
     F  F   F   F
     F  U   U   U
     U  U   U   U
     
    Since:
    2.0
    Version:
    2.0
    Author:
    Evren Sirin
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      FALSE  
      TRUE  
      UNKNOWN  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract Bool and​(Bool other)  
      abstract boolean isFalse()  
      abstract boolean isKnown()  
      abstract boolean isTrue()  
      abstract Bool not()  
      abstract Bool or​(Bool other)  
      static Bool valueOf​(boolean value)
      Returns the enum constant of this type with the specified name.
      static Bool valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Bool[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • FALSE

        public static final Bool FALSE
      • TRUE

        public static final Bool TRUE
      • UNKNOWN

        public static final Bool UNKNOWN
    • Method Detail

      • values

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

        public static Bool valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • valueOf

        public static Bool valueOf​(boolean value)
        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:
        value - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • and

        public abstract Bool and​(Bool other)
      • isFalse

        public abstract boolean isFalse()
      • isKnown

        public abstract boolean isKnown()
      • isTrue

        public abstract boolean isTrue()
      • not

        public abstract Bool not()
      • or

        public abstract Bool or​(Bool other)