Interface Hson.Struct.Builder
- All Superinterfaces:
Builder<Hson.Struct.Builder, Hson.Struct>, Supplier<Hson.Struct>
- Enclosing interface:
Hson.Struct
Fluent API builder for
Hson.Struct.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionSet a boolean value.Set a double value.Set a float value.Set an int value.Set a long value.set(String key, Hson.Array value) Set an array.set(String key, Hson.Value<?> value) Set a value.Set a string value.set(String key, BigDecimal value) Set aBigDecimalvalue.setBooleans(String key, List<Boolean> value) Set an array of booleans.setDoubles(String key, List<Double> value) Set an array of doubles.Set an array of longs.Set a null value for the specified key.setNumbers(String key, List<BigDecimal> value) Set an array of numbers (such asBigDecimal).setStrings(String key, List<String> value) Set an array of strings.setStructs(String key, List<Hson.Struct> value) Set an array of structs.Unset an existing value assigned to the key.Methods inherited from interface Builder
build, get, identity, updateModifier and TypeMethodDescriptionbuild()Build the instance from this builder.default Hson.Structget()default Hson.Struct.Builderidentity()Instance of this builder as the correct type.default Hson.Struct.Builderupdate(Consumer<Hson.Struct.Builder> consumer) Update the builder in a fluent API way.
-
Method Details
-
unset
Unset an existing value assigned to the key. This method does not care if the key is mapped or not.- Parameters:
key- key to unset- Returns:
- updated instance (this instance)
-
setNull
Set a null value for the specified key.- Parameters:
key- key to set- Returns:
- updated instance (this instance)
-
set
Set a value.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
set
Set a string value.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
set
Set a boolean value.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
set
Set a double value.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
set
Set a float value.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
set
Set an int value.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
set
Set a long value.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
set
Set aBigDecimalvalue.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
set
Set an array.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
setStructs
Set an array of structs.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
setStrings
Set an array of strings.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
setLongs
Set an array of longs.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
setDoubles
Set an array of doubles.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
setNumbers
Set an array of numbers (such asBigDecimal).- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-
setBooleans
Set an array of booleans.- Parameters:
key- key to setvalue- value to assign to the key- Returns:
- updated instance (this instance)
-