public class OptionSet extends DynamicStructure implements UaOptionSet, OptionSetStructure
| Modifier and Type | Class and Description |
|---|---|
static class |
OptionSet.Builder
Base for Structure-OptionSet builders.
|
static class |
OptionSet.Fields
The fields of the
OptionSet Structure. |
Structure.MapKind<T>UaNamespaceTranslateable.Context| Modifier and Type | Field and Description |
|---|---|
static OptionSetStructureSpecification |
SPECIFICATION |
| Modifier | Constructor and Description |
|---|---|
|
OptionSet() |
|
OptionSet(ByteString value,
ByteString validBits) |
protected |
OptionSet(UaDataTypeSpecification specification) |
| Modifier and Type | Method and Description |
|---|---|
OptionSet |
clone()
Clones the Structure.
|
boolean |
contains(OptionSpecification... options)
Returns true if the given option is set.
|
ByteString |
getValidBits() |
ByteString |
getValue()
Returns the "Value" of the OptionSet.
|
boolean |
isBitSet(int position)
Is bit set in position.
|
boolean |
isValid(int bitPosition)
Returns true if the bit position is set in the
getValidBits(). |
boolean |
isValid(OptionSpecification option)
Returns true if the option exist (is part of
OptionSetStructure.specification()) and it's position is set
in the getValidBits(). |
void |
set(FieldSpecification field,
Object value)
Sets a new value for a field.
|
void |
setValid(int bitPosition,
boolean valid)
Sets or clears the bit in
getValidBits() in the position. |
void |
setValid(OptionSpecification option,
boolean valid)
Sets or clears the bit in
getValidBits() in the position. |
void |
setValidBits(ByteString validBits) |
void |
setValue(ByteString value) |
OptionSetStructureSpecification |
specification()
Returns the specification of the given Structure.
|
OptionSet.Builder |
toBuilder()
Returns a builder with the data of this Structure pre-set.
|
builderclear, equals, forEachField, forEachField, get, get, hashCode, indexGet, indexSet, set, toFieldNamesMap, toFieldNamesMap, toFieldsMap, toFieldsMap, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitclear, forEachField, forEachField, get, get, reduceFields, reduceFields, set, toFieldNamesMap, toFieldNamesMap, toFieldsMap, toFieldsMap, toMap, withTranslatedNamespacescontainsAll, toBitSet, toOptionsMappublic static final OptionSetStructureSpecification SPECIFICATION
public OptionSet()
public OptionSet(ByteString value, ByteString validBits)
protected OptionSet(UaDataTypeSpecification specification)
public OptionSet clone()
AbstractStructureCloneNotSupportedException
as all Structures must be cloneable.clone in interface Structureclone in class DynamicStructurepublic boolean contains(OptionSpecification... options)
UaOptionSetOptionSet structure the option can only be
set if it is also marked as valid per getValidBits().contains in interface UaOptionSetpublic ByteString getValidBits()
public ByteString getValue()
UaOptionSetOptionSet this is the getValue() field
value (note that you must also check getValidBits() to know which bit
positions are valid).getValue in interface UaOptionSetpublic boolean isBitSet(int position)
BitFieldpublic final boolean isValid(int bitPosition)
OptionSetStructuregetValidBits().isValid in interface OptionSetStructurepublic final boolean isValid(OptionSpecification option)
OptionSetStructureOptionSetStructure.specification()) and it's position is set
in the getValidBits().isValid in interface OptionSetStructurepublic void set(FieldSpecification field, Object value)
StructureStructure.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 Structureset in class AbstractStructurefield - 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)public void setValid(int bitPosition,
boolean valid)
OptionSetStructuregetValidBits() in the position. Does nothing if the
given position is not one of the OptionSetStructure.specification() option(s) position.setValid in interface OptionSetStructurepublic void setValid(OptionSpecification option, boolean valid)
OptionSetStructuregetValidBits() in the position. Does nothing if the
given option is not part of OptionSetStructure.specification().setValid in interface OptionSetStructurepublic void setValidBits(ByteString validBits)
public void setValue(ByteString value)
public OptionSetStructureSpecification specification()
Structurespecification in interface Structurespecification in interface OptionSetStructurespecification in interface UaOptionSetspecification in class AbstractStructurepublic OptionSet.Builder toBuilder()
Structure#getClass() as this one.toBuilder in interface StructuretoBuilder in interface OptionSetStructuretoBuilder in interface UaOptionSettoBuilder in class AbstractStructureCopyright © 2026. All rights reserved.