Class AbstractLazyEncodedNamedInteger<T extends NamedInteger>
- java.lang.Object
-
- com.opencloud.util.AbstractDataObject
-
- com.opencloud.util.AbstractFieldsObject
-
- AbstractEncodedDataObject<T>
-
- AbstractLazyEncodedDataObject<T>
-
- AbstractLazyEncodedNamedInteger<T>
-
- All Implemented Interfaces:
DataObject
,Serializable
- Direct Known Subclasses:
BearerCapability.ITU_T.Ericsson.Ericsson4b
,BearerCapability.ITU_T.Layer1Capability.Details.ParityAndModem.Modem
,BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital
,BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.V110
,BearerCapability.ITU_T.Layer1Capability.Details.UnrestrictedDigital.V120
,LegType
,MMCode
,SMSDataCodingScheme
,SMSDataCodingScheme.GeneralScheme
,SMSDataCodingScheme.MessageCodingScheme
,SMSDataCodingScheme.MessageWaitingScheme
,SMSProtocolId
,SSCode
public abstract class AbstractLazyEncodedNamedInteger<T extends NamedInteger> extends AbstractLazyEncodedDataObject<T>
Class AbstractLazyEncodedNamedInteger represents a NamedInteger in which bit-fields within the named integer are also represented in a decoded form, with conversions between the two forms done lazily (when first needed). Having a decoded representation of the state is convenient if the positions of fields in the encoded representation can vary depending on the values of other fields that might not have been supplied yet. For example, the presence/absence of optional fields, and the lengths of variable-length fields, can both affect the positions of later fields. Once an object has been marked read-only, both encoded and decoded forms can co-exist.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.opencloud.slee.resources.cgin.AbstractLazyEncodedDataObject
isDecoded
-
Fields inherited from class com.opencloud.slee.resources.cgin.AbstractEncodedDataObject
encoded
-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractLazyEncodedNamedInteger()
Constructs a new AbstractLazyEncodedNamedInteger with no field values.protected
AbstractLazyEncodedNamedInteger(byte[] data)
Constructs a new AbstractLazyEncodedNamedInteger object from network-encoded data.protected
AbstractLazyEncodedNamedInteger(byte[] data, int start, int len)
Constructs a new AbstractLazyEncodedNamedInteger from part of given network-encoded data.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract T
fromValue(int value)
Converts an int to a NamedInteger.-
Methods inherited from class com.opencloud.slee.resources.cgin.AbstractLazyEncodedDataObject
checkDecode, checkFieldsSet, checkModifyAndDecode, decode, encode
-
Methods inherited from class com.opencloud.util.AbstractFieldsObject
equals, getFieldsMap, hashCode, toString
-
Methods inherited from class com.opencloud.util.AbstractDataObject
checkModify, clone, isReadOnly, setReadOnly
-
-
-
-
Constructor Detail
-
AbstractLazyEncodedNamedInteger
protected AbstractLazyEncodedNamedInteger()
Constructs a new AbstractLazyEncodedNamedInteger with no field values.
-
AbstractLazyEncodedNamedInteger
protected AbstractLazyEncodedNamedInteger(byte[] data)
Constructs a new AbstractLazyEncodedNamedInteger object from network-encoded data. The state is in the encoded form: it is not decoded and might not be decodable.- Parameters:
data
- network-encoded data- Throws:
NullPointerException
- if data is null
-
AbstractLazyEncodedNamedInteger
protected AbstractLazyEncodedNamedInteger(byte[] data, int start, int len)
Constructs a new AbstractLazyEncodedNamedInteger from part of given network-encoded data. The part starts at indexstart
and islen
bytes long. The state is in the encoded form: it is not decoded and might not be decodable.- Parameters:
data
- network-encoded datastart
- starting offset of network-encoded datalen
- length of encoded data in bytes- Throws:
NullPointerException
- if data is nullIllegalArgumentException
- if len is negativeArrayIndexOutOfBoundsException
- if the part is not within the data
-
-
Method Detail
-
fromValue
protected abstract T fromValue(int value)
Converts an int to a NamedInteger. Reuses any existing instance where possible.- Parameters:
value
- int- Returns:
- T extends NamedInteger
-
-