public abstract class KlvNumericalDataElement<T extends Number> extends KlvDataElement<T>
| Modifier and Type | Field and Description |
|---|---|
protected Optional<T> |
errorIndicatorValue |
key, keyBytes, name, value| Constructor and Description |
|---|
KlvNumericalDataElement(byte[] key,
String name)
Constructs a
KlvNumericalDataElement that describes how to interpret the value of a
numerical element with the given key. |
KlvNumericalDataElement(byte[] key,
String name,
Optional<T> errorIndicatorValue)
Constructs a
KlvNumericalDataElement that describes how to interpret the value of a
numerical element with the given key. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract KlvNumericalDataElement<T> |
copy() |
protected abstract void |
decodeValue(Klv klv) |
boolean |
isErrorIndicated()
If an error indicator value is present, then compare it to the decoded value.
|
getKey, getKeyAsString, getName, getValuepublic KlvNumericalDataElement(byte[] key,
String name)
KlvNumericalDataElement that describes how to interpret the value of a
numerical element with the given key.key - the data element's keyname - a name describing the data element's valueIllegalArgumentException - if any arguments are nullpublic KlvNumericalDataElement(byte[] key,
String name,
Optional<T> errorIndicatorValue)
KlvNumericalDataElement that describes how to interpret the value of a
numerical element with the given key.key - the data element's keyname - a name describing the data element's valueerrorIndicatorValue - value that indicates an encoded errorIllegalArgumentException - if any arguments are nullprotected abstract void decodeValue(Klv klv)
decodeValue in class KlvDataElement<T extends Number>protected abstract KlvNumericalDataElement<T> copy()
copy in class KlvDataElement<T extends Number>public boolean isErrorIndicated()
isErrorIndicated in class KlvDataElement<T extends Number>This work is licensed under a Creative Commons Attribution 4.0 International License.