public abstract static class AbstractStructure.Builder extends Object implements Structure.Builder
| Modifier | Constructor and Description |
|---|---|
protected |
Builder(UaDataTypeSpecification specification,
Supplier<? extends Structure> emptyInstanceSupplier)
Constructor for Builder.
|
| Modifier and Type | Method and Description |
|---|---|
AbstractStructure |
build()
Builds a Structure with the given data.
|
AbstractStructure.Builder |
clear()
Sets all fields to their default values (i.e.
|
boolean |
equals(Object obj) |
Object |
get(FieldSpecification field)
Get the value of the given field.
|
Object |
get(String fieldName)
Get the value of the given field.
|
int |
hashCode() |
protected <T> T |
indexGet(int index)
Returns the field in the given index.
|
protected <T> void |
indexSet(T value,
int index)
Sets the given value to the given index.
|
AbstractStructure.Builder |
set(FieldSpecification field,
Object value)
Sets a new value for a field.
|
AbstractStructure.Builder |
set(String fieldName,
Object value)
Sets a new value for a field.
|
StructureSpecification |
specification()
Returns the specification of the Structures that this builder builds.
|
String |
toString() |
protected Builder(UaDataTypeSpecification specification, Supplier<? extends Structure> emptyInstanceSupplier)
public AbstractStructure build()
Structure.Builderbuild in interface Structure.Builderpublic AbstractStructure.Builder clear()
Structure.BuilderStructure.Builder shall the same as a newly created instance where no fields have been set.clear in interface Structure.Builderpublic Object get(FieldSpecification field)
Structure.Builderget in interface Structure.Builderfield - specification of a field, must be one of the fields in the specification given
by Structure.Builder.specification().public Object get(String fieldName)
Structure.BuilderFieldSpecifications in the specification given by Structure.Builder.specification().get in interface Structure.BuilderfieldName - name of the fieldpublic AbstractStructure.Builder set(FieldSpecification field, Object value)
Structure.BuilderStructure.specification(). Setting an Optional Field to null will make it
not present for encoding. Setting a Field in an Union will unset other fields.set in interface Structure.Builderfield - specification of a field, must be one of the fields in the specification given
by Structure.specification().value - the value of the field (can be null) * @throws IllegalArgumentException if the
given field is not one of the fields of the Structure.Builder.specification().public AbstractStructure.Builder set(String fieldName, Object value)
Structure.BuilderFieldSpecifications in the specification given by Structure.specification().
Setting an Optional Field to null will make it not present for encoding. Setting a Field in
an Union will unset other fields.set in interface Structure.BuilderfieldName - the field, must be the name of one of the FieldSpecifications in the
specification given by Structure.Builder.specification().value - new value for the given field, can be null.public StructureSpecification specification()
Structure.Builderspecification in interface Structure.Builderprotected <T> T indexGet(int index)
protected <T> void indexSet(T value,
int index)
Copyright © 2026. All rights reserved.