public class Option extends DescribableEntity
Option for a property value This class is not thread safe.
  • Constructor Details

    • Option

      public Option()
  • Method Details

    • clear

      public void clear()
      Clear the object and reset to defaults
      Overrides:
      clear in class DescribableEntity
    • fromJSONObject

      public void fromJSONObject(jakarta.json.JsonObject jsonObj) throws IOException
      Extract the metadata from the JSON object. This method first calls clear()
      Overrides:
      fromJSONObject in class DescribableEntity
      Parameters:
      jsonObj - The JSON Object
      Throws:
      IOException - If JSON parsing fails
    • getValue

      public String getValue()
      Get the value for the option
      Returns:
      the value or null
    • setValue

      public void setValue(String value)
      Set the value for the option
      Parameters:
      value - the value to set
    • createJson

      protected jakarta.json.JsonObjectBuilder createJson() throws IOException
      Convert this object into JSON
      Overrides:
      createJson in class DescribableEntity
      Returns:
      The json object builder
      Throws:
      IOException - If generating the JSON fails