Class GenericDigitsWithStarHash
- java.lang.Object
-
- com.opencloud.util.AbstractDataObject
-
- com.opencloud.util.AbstractFieldsObject
-
- AbstractEncodedDataObject<T>
-
- AbstractLazyEncodedDataObject<byte[]>
-
- AbstractLazyEncodedByteArray
-
- com.opencloud.slee.resources.in.datatypes.cc.GenericDigits
-
- com.opencloud.slee.resources.in.datatypes.cc.GenericDigitsWithStarHash
-
- All Implemented Interfaces:
DataObject
,FastSerializable
,Serializable
public final class GenericDigitsWithStarHash extends GenericDigits
Class GenericDigitsWithStarHash represents a GenericDigits in which additional characters '*' and '#' are permitted in the decoded form of the encoding schemes BCD_ODD and BCD_EVEN, encoding to 0xB and 0xC respectively.The encoding to semi-octets by encoding schemes BCD_ODD and BCD_EVEN, unless overridden by a particular
StringCodec
, is as tabulated below.Decoded character 0 1 2 3 4 5 6 7 8 9 * # Encoded hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F - See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.opencloud.slee.resources.in.datatypes.cc.GenericDigits
GenericDigits.EncodingScheme, GenericDigits.TypeOfDigits
-
-
Field Summary
Fields Modifier and Type Field Description static BCDStringCodec<GenericDigits>
ADDRESS_CODEC_BCD
BCD string codec for field Address.static BinaryStringCodec<GenericDigits>
ADDRESS_CODEC_BINARY
Binary string codec for field Address.static IA5StringCodec<GenericDigits>
ADDRESS_CODEC_IA5
ASCII/ISO646-US string codec for field Address.-
Fields inherited from class com.opencloud.slee.resources.in.datatypes.cc.GenericDigits
Address_value, EncodingScheme_value, TypeOfDigits_value
-
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 Constructor Description GenericDigitsWithStarHash()
Constructs a new GenericDigitsWithStarHash object with no fields set.GenericDigitsWithStarHash(byte[] data)
Constructs a new GenericDigitsWithStarHash object from network-encoded data.GenericDigitsWithStarHash(byte[] data, int start, int len)
Constructs a new GenericDigitsWithStarHash object from part of network-encoded data.GenericDigitsWithStarHash(GenericDigits.EncodingScheme encodingScheme, GenericDigits.TypeOfDigits typeOfDigits, String address)
Constructs a new GenericDigitsWithStarHash object from given values for all fields.GenericDigitsWithStarHash(GenericDigits.EncodingScheme encodingScheme, GenericDigits.TypeOfDigits typeOfDigits, String address, StringCodec<GenericDigits> Address_codec)
Constructs a new GenericDigitsWithStarHash object from given arguments, using the given codecs for encoding fields of type String.GenericDigitsWithStarHash(DataInput in)
Constructs a new GenericDigitsWithStarHash object from data deserialized from a stream that was written byGenericDigits.toStream(DataOutput)
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GenericDigitsWithStarHash
copyOf(GenericDigits from)
Creates a new object of this type, cloning the values of common fields from the given object of any subclass of the same base type.StringCodec<GenericDigits>
getAddressCodec()
Gets the codec used for field Address.GenericDigitsWithStarHash
setAddress(String value)
Sets the value of the address.GenericDigitsWithStarHash
setAddress(String value, StringCodec<GenericDigits> codec)
Sets the value of the address using the given codec.GenericDigitsWithStarHash
setAddressEncoded(EncodedStringWithIndicators encoded)
Sets the encoded value of the address to a clone of the given EncodedStringIndicators.GenericDigitsWithStarHash
setEncodingScheme(GenericDigits.EncodingScheme value)
Sets the value of the encoding scheme.GenericDigitsWithStarHash
setTypeOfDigits(GenericDigits.TypeOfDigits value)
Sets the value of the type of digits.-
Methods inherited from class com.opencloud.slee.resources.in.datatypes.cc.GenericDigits
checkFieldsSet, clone, decode, encode, encodedIsInvalid, getAddress, getAddress, getAddressEncoded, getContainedLength, getEncodedForm, getEncodingScheme, getFieldAccessors, getFieldsMap, getTypeOfDigits, hasAddress, hasEncodingScheme, hasTypeOfDigits, toStream
-
Methods inherited from class com.opencloud.slee.resources.cgin.AbstractLazyEncodedDataObject
checkDecode, checkModifyAndDecode
-
Methods inherited from class com.opencloud.util.AbstractFieldsObject
equals, hashCode, toString
-
Methods inherited from class com.opencloud.util.AbstractDataObject
checkModify, isReadOnly, setReadOnly
-
-
-
-
Field Detail
-
ADDRESS_CODEC_BCD
public static final BCDStringCodec<GenericDigits> ADDRESS_CODEC_BCD
BCD string codec for field Address.
-
ADDRESS_CODEC_BINARY
public static final BinaryStringCodec<GenericDigits> ADDRESS_CODEC_BINARY
Binary string codec for field Address.
-
ADDRESS_CODEC_IA5
public static final IA5StringCodec<GenericDigits> ADDRESS_CODEC_IA5
ASCII/ISO646-US string codec for field Address.
-
-
Constructor Detail
-
GenericDigitsWithStarHash
public GenericDigitsWithStarHash()
Constructs a new GenericDigitsWithStarHash object with no fields set.
-
GenericDigitsWithStarHash
public GenericDigitsWithStarHash(byte[] data)
Constructs a new GenericDigitsWithStarHash object from network-encoded data. The data is not decoded and might not be decodable.- Parameters:
data
- network-encoded data- Throws:
NullPointerException
- if data is null
-
GenericDigitsWithStarHash
public GenericDigitsWithStarHash(byte[] data, int start, int len)
Constructs a new GenericDigitsWithStarHash object from part of network-encoded data. The part starts at indexstart
and islen
bytes long. The data is not decoded and might not be decodable.- Parameters:
data
- network-encoded datastart
- starting offset of network-encoded data in byte arraylen
- default length if not predictable- Throws:
NullPointerException
- if data is nullIllegalArgumentException
- if len is negative
-
GenericDigitsWithStarHash
public GenericDigitsWithStarHash(GenericDigits.EncodingScheme encodingScheme, GenericDigits.TypeOfDigits typeOfDigits, String address)
Constructs a new GenericDigitsWithStarHash object from given values for all fields.- Parameters:
encodingScheme
- the encoding schemetypeOfDigits
- the type of digitsaddress
- the address
-
GenericDigitsWithStarHash
public GenericDigitsWithStarHash(GenericDigits.EncodingScheme encodingScheme, GenericDigits.TypeOfDigits typeOfDigits, String address, StringCodec<GenericDigits> Address_codec)
Constructs a new GenericDigitsWithStarHash object from given arguments, using the given codecs for encoding fields of type String.- Parameters:
encodingScheme
- the encoding schemetypeOfDigits
- the type of digitsaddress
- the addressAddress_codec
- StringCodec for address
-
GenericDigitsWithStarHash
public GenericDigitsWithStarHash(DataInput in) throws IOException
Constructs a new GenericDigitsWithStarHash object from data deserialized from a stream that was written byGenericDigits.toStream(DataOutput)
.- Parameters:
in
- the stream to read from- Throws:
EOFException
- if reading is pre-empted by end-of-fileIOException
- if the data cannot be read
-
-
Method Detail
-
setEncodingScheme
public GenericDigitsWithStarHash setEncodingScheme(GenericDigits.EncodingScheme value) throws IllegalStateException
Sets the value of the encoding scheme.- Overrides:
setEncodingScheme
in classGenericDigits
- Parameters:
value
- EncodingScheme representation of the encoding scheme- Returns:
- this
- Throws:
IllegalStateException
-
setTypeOfDigits
public GenericDigitsWithStarHash setTypeOfDigits(GenericDigits.TypeOfDigits value) throws IllegalStateException
Sets the value of the type of digits.- Overrides:
setTypeOfDigits
in classGenericDigits
- Parameters:
value
- TypeOfDigits representation of the type of digits- Returns:
- this
- Throws:
IllegalStateException
-
setAddress
public GenericDigitsWithStarHash setAddress(String value) throws IllegalStateException
Sets the value of the address.- Overrides:
setAddress
in classGenericDigits
- Parameters:
value
- String representation of the address- Returns:
- this
- Throws:
IllegalStateException
-
setAddress
public GenericDigitsWithStarHash setAddress(String value, StringCodec<GenericDigits> codec) throws IllegalArgumentException
Sets the value of the address using the given codec. If the given codec is null, uses the standard codec. The standard codec is determined by the values of other fields, so ensure that those other fields are set before calling this setter.- Overrides:
setAddress
in classGenericDigits
- Parameters:
value
- String representation of the addresscodec
- StringCodec to use for encoding- Returns:
- this
- Throws:
IllegalArgumentException
-
setAddressEncoded
public GenericDigitsWithStarHash setAddressEncoded(EncodedStringWithIndicators encoded)
Sets the encoded value of the address to a clone of the given EncodedStringIndicators.- Overrides:
setAddressEncoded
in classGenericDigits
- Parameters:
encoded
- EncodedStringWithIndicators representation of the address- Returns:
- this
-
copyOf
public static GenericDigitsWithStarHash copyOf(GenericDigits from)
Creates a new object of this type, cloning the values of common fields from the given object of any subclass of the same base type.- Parameters:
from
- the object from which to copy- Returns:
- GenericDigitsWithStarHash
-
getAddressCodec
public StringCodec<GenericDigits> getAddressCodec()
Gets the codec used for field Address. This depends on the current value of field EncodingScheme.- Overrides:
getAddressCodec
in classGenericDigits
- Returns:
- StringCodec
-
-