Module json_values
Package jsonvalues

Class JsPrimitive

java.lang.Object
jsonvalues.JsPrimitive
All Implemented Interfaces:
JsValue
Direct Known Subclasses:
JsBinary, JsBool, JsInstant, JsNull, JsNumber, JsStr

public abstract sealed class JsPrimitive extends Object implements JsValue permits JsBinary, JsBool, JsInstant, JsNull, JsNumber, JsStr
Represents a JsValue that is not a container (JsObj or JsArray)
  • Constructor Details

    • JsPrimitive

      public JsPrimitive()
  • Method Details

    • isPrimitive

      public boolean isPrimitive()
      Description copied from interface: JsValue
      Returns true if this JsValue is a not a Json (neither JsObj nor JsArray)
      Specified by:
      isPrimitive in interface JsValue
      Returns:
      true if this JsValue is a not a Json (neither JsObj nor JsArray)
    • isJson

      public boolean isJson()
      Description copied from interface: JsValue
      Returns true if this JsValue is a Json (JsObj or JsArray)
      Specified by:
      isJson in interface JsValue
      Returns:
      true if this JsValue is a Json (JsObj or JsArray)