Class JSONBooleanValue


  • public class JSONBooleanValue
    extends JSONValue
    JSON value class representing a boolean value.
    • Field Detail

      • TRUE

        public static final JSONBooleanValue TRUE
        singleton instance representing true.
      • FALSE

        public static final JSONBooleanValue FALSE
        singleton instance representing false.
    • Method Detail

      • fromValue

        public static JSONBooleanValue fromValue​(boolean value)
        Factory method to create a JSONBooleanValue from a given boolean value.

        The return value is one of the two singleton instances TRUE or FALSE, depending on value.

        Parameters:
        value - The boolean value.
        Returns:
        Returns either FALSE or TRUE.
      • isBoolean

        public boolean isBoolean()
        Description copied from class: JSONValue
        Get a boolean indicating whether this instance represents a JSON boolean value or not.
        Overrides:
        isBoolean in class JSONValue
        Returns:
        true for objects representing a boolean value, false otherwise.
      • getValue

        public boolean getValue()
        Get value represented by this instance.
        Returns:
        Boolean value represented by this instance.