Package com.launchdarkly.sdk
Class ObjectBuilder
java.lang.Object
com.launchdarkly.sdk.ObjectBuilder
A builder created by
LDValue.buildObject()
.
Builder methods are not thread-safe.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns an object containing the builder's current elements.Sets a key-value pair in the builder, overwriting any previous value for that key.Sets a key-value pair in the builder, overwriting any previous value for that key.Sets a key-value pair in the builder, overwriting any previous value for that key.Sets a key-value pair in the builder, overwriting any previous value for that key.Sets a key-value pair in the builder, overwriting any previous value for that key.Sets a key-value pair in the builder, overwriting any previous value for that key.Sets a key-value pair in the builder, overwriting any previous value for that key.
-
Constructor Details
-
ObjectBuilder
public ObjectBuilder()
-
-
Method Details
-
put
Sets a key-value pair in the builder, overwriting any previous value for that key.- Parameters:
key
- a string keyvalue
- a value- Returns:
- the same builder
-
put
Sets a key-value pair in the builder, overwriting any previous value for that key.- Parameters:
key
- a string keyvalue
- a value- Returns:
- the same builder
-
put
Sets a key-value pair in the builder, overwriting any previous value for that key.- Parameters:
key
- a string keyvalue
- a value- Returns:
- the same builder
-
put
Sets a key-value pair in the builder, overwriting any previous value for that key.- Parameters:
key
- a string keyvalue
- a value- Returns:
- the same builder
-
put
Sets a key-value pair in the builder, overwriting any previous value for that key.- Parameters:
key
- a string keyvalue
- a value- Returns:
- the same builder
-
put
Sets a key-value pair in the builder, overwriting any previous value for that key.- Parameters:
key
- a string keyvalue
- a value- Returns:
- the same builder
-
put
Sets a key-value pair in the builder, overwriting any previous value for that key.- Parameters:
key
- a string keyvalue
- a value- Returns:
- the same builder
-
build
Returns an object containing the builder's current elements. Subsequent changes to the builder will not affect this value (it uses copy-on-write logic, so the previous values will only be copied to a new map if you continue to add elements after callingbuild()
.- Returns:
- an
LDValue
that is a JSON object
-