Class JsonObjectBuilderImpl

java.lang.Object
org.apache.activemq.artemis.json.impl.JsonObjectBuilderImpl
All Implemented Interfaces:
JsonObjectBuilder

public class JsonObjectBuilderImpl extends Object implements JsonObjectBuilder
  • Constructor Details

    • JsonObjectBuilderImpl

      public JsonObjectBuilderImpl(javax.json.JsonObjectBuilder rawObjectBuilder)
  • Method Details

    • getRawObjectBuilder

      public javax.json.JsonObjectBuilder getRawObjectBuilder()
    • add

      public JsonObjectBuilder add(String name, JsonValue value)
      Description copied from interface: JsonObjectBuilder
      Add the given JsonValue value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.
      Specified by:
      add in interface JsonObjectBuilder
      Parameters:
      name - the JSON attribute name
      value - the JsonValue to add
      Returns:
      the current JsonObjectBuilder
    • add

      public JsonObjectBuilder add(String name, String value)
      Description copied from interface: JsonObjectBuilder
      Add the given String value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.
      Specified by:
      add in interface JsonObjectBuilder
      Parameters:
      name - the JSON attribute name
      value - the String value to add
      Returns:
      the current JsonObjectBuilder
    • add

      public JsonObjectBuilder add(String name, String value, JsonValue defaultValue)
      Specified by:
      add in interface JsonObjectBuilder
    • add

      public JsonObjectBuilder add(String name, BigInteger value)
      Description copied from interface: JsonObjectBuilder
      Add the given BigInteger value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.
      Specified by:
      add in interface JsonObjectBuilder
      Parameters:
      name - the JSON attribute name
      value - the BigInteger value to add
      Returns:
      the current JsonObjectBuilder
    • add

      public JsonObjectBuilder add(String name, BigInteger value, JsonValue defaultValue)
      Specified by:
      add in interface JsonObjectBuilder
    • add

      public JsonObjectBuilder add(String name, BigDecimal value)
      Description copied from interface: JsonObjectBuilder
      Add the given BigDecimal value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.
      Specified by:
      add in interface JsonObjectBuilder
      Parameters:
      name - the JSON attribute name
      value - the BigDecimal value to add
      Returns:
      the current JsonObjectBuilder
    • add

      public JsonObjectBuilder add(String name, BigDecimal value, JsonValue defaultValue)
      Specified by:
      add in interface JsonObjectBuilder
    • add

      public JsonObjectBuilder add(String name, int value)
      Description copied from interface: JsonObjectBuilder
      Add the given int value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.
      Specified by:
      add in interface JsonObjectBuilder
      Parameters:
      name - the JSON attribute name
      value - to add
      Returns:
      the current JsonObjectBuilder
    • add

      public JsonObjectBuilder add(String name, long value)
      Description copied from interface: JsonObjectBuilder
      Add the given long value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.
      Specified by:
      add in interface JsonObjectBuilder
      Parameters:
      name - the JSON attribute name
      value - to add
      Returns:
      the current JsonObjectBuilder
    • add

      public JsonObjectBuilder add(String name, double value)
      Description copied from interface: JsonObjectBuilder
      Add the given double value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.
      Specified by:
      add in interface JsonObjectBuilder
      Parameters:
      name - the JSON attribute name
      value - to add
      Returns:
      the current JsonObjectBuilder
    • add

      public JsonObjectBuilder add(String name, boolean value)
      Description copied from interface: JsonObjectBuilder
      Add the given boolean value to the JsonObject to be created. If a value with that name already exists it will be replaced by the new value.
      Specified by:
      add in interface JsonObjectBuilder
      Parameters:
      name - the JSON attribute name
      value - to add
      Returns:
      the current JsonObjectBuilder
    • addNull

      public JsonObjectBuilder addNull(String name)
      Description copied from interface: JsonObjectBuilder
      Add a JsonValue.NULL value to the JsonObject to be created. If a value with that name already exists it will be replaced by the null value.
      Specified by:
      addNull in interface JsonObjectBuilder
      Parameters:
      name - the JSON attribute name
      Returns:
      the current JsonObjectBuilder
    • add

      public JsonObjectBuilder add(String name, JsonObjectBuilder builder)
      Description copied from interface: JsonObjectBuilder
      Use the given JsonObjectBuilder to create a JsonObject which will be added to the JsonObject to be created by this builder. If a value with that name already exists it will be replaced by the new value.
      Specified by:
      add in interface JsonObjectBuilder
      Parameters:
      name - the JSON attribute name
      builder - for creating the JsonObject to add
      Returns:
      the current JsonObjectBuilder
    • add

      public JsonObjectBuilder add(String name, JsonArrayBuilder builder)
      Description copied from interface: JsonObjectBuilder
      Use the given JsonArrayBuilder to create a JsonArray which will be added to the JsonObject to be created by this builder. If a value with that name already exists it will be replaced by the new value.
      Specified by:
      add in interface JsonObjectBuilder
      Parameters:
      name - the JSON attribute name
      builder - for creating the JsonArray to add
      Returns:
      the current JsonObjectBuilder
    • remove

      public JsonObjectBuilder remove(String name)
      Description copied from interface: JsonObjectBuilder
      Remove the attribute with the given name from the builder.
      Specified by:
      remove in interface JsonObjectBuilder
    • build

      public JsonObject build()
      Description copied from interface: JsonObjectBuilder
      Returns a JsonObject based on the added values.
      Specified by:
      build in interface JsonObjectBuilder
      Returns:
      a JsonObject based on the added values