T - Enum defining the Options of the OptionSet.S - The BuiltIn Type which is used in binary transmissions for the type.U - The type (that inherits this) itself.V - The Builder for the type itself (that inherits this).public abstract class AbstractOptionSetDataType<T extends Enum<T> & OptionSpecification,S extends Number,U extends AbstractOptionSetDataType<T,S,U,V>,V extends AbstractOptionSetDataType.AbstractBuilder<T>> extends Object implements OptionSetDataType<T,S>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractOptionSetDataType.AbstractBuilder<T extends Enum<T> & OptionSpecification>
This class is designed to be subtyped by codegen classes only.
|
UaOptionSet.Builder| Modifier and Type | Field and Description |
|---|---|
protected UaNodeId |
baseDataTypeId |
protected Class<S> |
builtInTypeClass |
protected BitField |
delegate |
protected Class<T> |
optionClass |
protected int |
sizeInBits |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractOptionSetDataType(BitField delegate,
Class<T> optionClass,
Class<S> builtInTypeClass,
UaNodeId baseDataTypeId,
int sizeInBits)
Internal constructor, should only be called by Codegen code.
|
| Modifier and Type | Method and Description |
|---|---|
S |
asBuiltInType()
Returns the data as the built-in type from which type is inherited.
|
protected static <T extends Enum<T> & OptionSpecification> |
computeBitField(AbstractOptionSetDataType<T,?,?,?>... values) |
protected static BitField |
computeBitField(BitField values) |
protected static BitField |
computeBitField(BitSet values) |
protected static BitField |
computeBitField(int... setBits) |
protected static <T extends Enum<T> & BitPosition> |
computeBitField(Iterable<T> fields) |
protected static <T extends Enum<T> & BitPosition> |
computeBitField(T... fields) |
protected static BitField |
computeBitFieldFixedSize(int size,
int... setBits) |
protected S |
computeBuiltInTypeValue(Class<S> clazz,
int size)
Builds the value in encodeable form.
|
boolean |
containsAll(U value)
Transforms the given value with
toSet() and returns result of
UaOptionSet.containsAll(Iterable). |
boolean |
equals(Object obj) |
UaNodeId |
getBaseTypeId()
Returns the base numeric DataTypeId, which matches the
OptionSetDataType.getBuiltInTypeClass() and
OptionSetDataType.asBuiltInType(). |
Class<S> |
getBuiltInTypeClass()
Returns the class object for the built-in type.
|
int |
getSizeInBits()
Returns the size in bits.
|
S |
getValue()
Returns the "Value" of the OptionSet.
|
int |
hashCode() |
boolean |
isBitSet(int position)
Is bit set in position.
|
V |
toBuilder()
Creates a new
UaOptionSet.Builder with set options that are set in this instance. |
Set<T> |
toSet()
Returns a
Set of the individual Options that are set in this OptionSet. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcontains, containsAll, specification, toBitSet, toOptionsMapprotected final BitField delegate
protected final Class<T extends Enum<T> & OptionSpecification> optionClass
protected final UaNodeId baseDataTypeId
protected final int sizeInBits
@SafeVarargs protected static <T extends Enum<T> & OptionSpecification> BitField computeBitField(AbstractOptionSetDataType<T,?,?,?>... values)
protected static BitField computeBitField(int... setBits)
protected static <T extends Enum<T> & BitPosition> BitField computeBitField(Iterable<T> fields)
protected static <T extends Enum<T> & BitPosition> BitField computeBitField(T... fields)
protected static BitField computeBitFieldFixedSize(int size, int... setBits)
public final S asBuiltInType()
OptionSetDataTypeasBuiltInType in interface OptionSetDataType<T extends Enum<T> & OptionSpecification,S extends Number>public final boolean containsAll(U value)
toSet() and returns result of
UaOptionSet.containsAll(Iterable).public final UaNodeId getBaseTypeId()
OptionSetDataTypeOptionSetDataType.getBuiltInTypeClass() and
OptionSetDataType.asBuiltInType().getBaseTypeId in interface OptionSetDataType<T extends Enum<T> & OptionSpecification,S extends Number>public final Class<S> getBuiltInTypeClass()
OptionSetDataTypegetBuiltInTypeClass in interface OptionSetDataType<T extends Enum<T> & OptionSpecification,S extends Number>public final int getSizeInBits()
OptionSetDataTypegetSizeInBits in interface OptionSetDataType<T extends Enum<T> & OptionSpecification,S extends Number>public final S getValue()
UaOptionSetOptionSet this is the OptionSet.getValue() field
value (note that you must also check OptionSet.getValidBits() to know which bit
positions are valid).getValue in interface UaOptionSetpublic final boolean isBitSet(int position)
BitFieldpublic V toBuilder()
UaOptionSetUaOptionSet.Builder with set options that are set in this instance.toBuilder in interface UaOptionSetpublic final Set<T> toSet()
Set of the individual Options that are set in this OptionSet.Copyright © 2026. All rights reserved.