Class BooleanValue


  • public class BooleanValue
    extends DoubleCompatibleValue
    A value which is either true or false. In numerical context true is interpreted as 1 and false as 0.
    Since:
    5.1.21
    Author:
    bratseth
    • Constructor Detail

      • BooleanValue

        public BooleanValue​(boolean value)
    • Method Detail

      • frozen

        public static BooleanValue frozen​(boolean value)
        Create a boolean value which is frozen at the outset.
      • asBoolean

        public boolean asBoolean()
        Description copied from class: Value
        Returns this value as a boolean.
        Specified by:
        asBoolean in class Value
      • asDouble

        public double asDouble()
        Description copied from class: Value
        Returns this value as a double, or throws UnsupportedOperationException if it cannot be represented as a double
        Specified by:
        asDouble in class Value
      • asMutable

        public Value asMutable()
        Description copied from class: Value
        Returns this is mutable, or a mutable copy otherwise
        Specified by:
        asMutable in class Value
      • toString

        public java.lang.String toString()
        Specified by:
        toString in class Value
      • equals

        public boolean equals​(java.lang.Object other)
        Specified by:
        equals in class Value
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class Value