Class JSONBoolean


  • public class JSONBoolean
    extends JSONSimple
    Represents a JSON boolean value. Examples are: true, false.
    • Field Detail

      • value

        private boolean value
    • Constructor Detail

      • JSONBoolean

        public JSONBoolean​(boolean value)
    • Method Detail

      • getValue

        public boolean getValue()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • render

        protected java.lang.String render​(boolean pretty,
                                          java.lang.String indent)
        Description copied from class: JSONValue
        Convert the JSON value into a string representation (JSON representation).
        Specified by:
        render in class JSONValue
        Parameters:
        pretty - Indicating if the print should be made pretty (human readers) or compact (transmission or storage).
        indent - Starting indent.
        Returns:
        A JSON representation.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • strip

        public java.lang.Object strip()
        Get the Java object, remove all JSON information. In the case of a JSONBoolean, this is a Java Boolean object.
        Specified by:
        strip in class JSONValue
        Returns:
        Boolean.TRUE or Boolean.FALSE depending on the value of the JSONBoolean.