Package com.launchdarkly.sdk
Class ArrayBuilder
java.lang.Object
com.launchdarkly.sdk.ArrayBuilder
A builder created by
LDValue.buildArray().
Builder methods are not thread-safe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(boolean value) Adds a new element to the builder.add(double value) Adds a new element to the builder.add(float value) Adds a new element to the builder.add(int value) Adds a new element to the builder.add(long value) Adds a new element to the builder.Adds a new element to the builder.Adds a new element to the builder.build()Returns an array containing the builder's current elements.
-
Constructor Details
-
ArrayBuilder
public ArrayBuilder()
-
-
Method Details
-
add
Adds a new element to the builder.- Parameters:
value- the new element- Returns:
- the same builder
-
add
Adds a new element to the builder.- Parameters:
value- the new element- Returns:
- the same builder
-
add
Adds a new element to the builder.- Parameters:
value- the new element- Returns:
- the same builder
-
add
Adds a new element to the builder.- Parameters:
value- the new element- Returns:
- the same builder
-
add
Adds a new element to the builder.- Parameters:
value- the new element- Returns:
- the same builder
-
add
Adds a new element to the builder.- Parameters:
value- the new element- Returns:
- the same builder
-
add
Adds a new element to the builder.- Parameters:
value- the new element- Returns:
- the same builder
-
build
Returns an array 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 list if you continue to add elements after callingbuild().- Returns:
- an
LDValuethat is an array
-