Class CCMessageID
-
- All Implemented Interfaces:
DataObject
,Serializable
public class CCMessageID extends AbstractFieldsObject
API for CC-DataTypes.MessageID. Generated from the following ASN.1 type definition and the adaptations below.MessageID ::= CHOICE { elementaryMessageID Integer4, text SEQUENCE { messageContent IA5String, attributes OCTET STRING OPTIONAL }, elementaryMessageIDs SEQUENCE OF Integer4, variableMessage SEQUENCE { elementaryMessageID Integer4, variableParts SEQUENCE OF VariablePart } } CC-DataTypes { MessageID { text { attributes { @extendible } } } }
Used as field type by
CCInbandInfo
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CCMessageID.Choice
API for CC-DataTypes.MessageID.Choice.static class
CCMessageID.Text
API for CC-DataTypes.MessageID.text.static class
CCMessageID.VariableMessage
API for CC-DataTypes.MessageID.variableMessage.
-
Field Summary
-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Constructor Description CCMessageID()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CCMessageID
clone()
Constructs a copy of this object and everything reachable from it.static CCMessageID
copyOf(CCMessageID 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.CCMessageID.Choice
getChoice()
Gets the discriminant of the current choice.int
getElementaryMessageID()
Gets the value of the elementaryMessageID choice.int[]
getElementaryMessageIDs()
Gets the value of the elementaryMessageIDs choice.static FieldAccessor[]
getFieldAccessors()
Gets a new array of the accessors for fields of this type.Map<String,Object>
getFieldsMap(boolean withAbsents)
Gets a Map from :discriminant-name to associated-value.CCMessageID.Text
getText()
Gets the value of the text choice.CCMessageID.VariableMessage
getVariableMessage()
Gets the value of the variableMessage choice.boolean
isElementaryMessageIDChosen()
Tests whether the choice is elementaryMessageID.boolean
isElementaryMessageIDsChosen()
Tests whether the choice is elementaryMessageIDs.boolean
isTextChosen()
Tests whether the choice is text.boolean
isVariableMessageChosen()
Tests whether the choice is variableMessage.CCMessageID
setElementaryMessageID(int value)
Sets the value of the elementaryMessageID choice.CCMessageID
setElementaryMessageIDs(int[] value)
Sets the value of the elementaryMessageIDs choice.void
setReadOnly()
Sets this and all its fields to be immutable.CCMessageID
setText(CCMessageID.Text value)
Sets the value of the text choice.CCMessageID
setVariableMessage(CCMessageID.VariableMessage value)
Sets the value of the variableMessage choice.-
Methods inherited from class com.opencloud.util.AbstractFieldsObject
equals, hashCode, toString
-
Methods inherited from class com.opencloud.util.AbstractDataObject
checkModify, isReadOnly
-
-
-
-
Method Detail
-
clone
public CCMessageID clone()
Constructs a copy of this object and everything reachable from it.- Specified by:
clone
in interfaceDataObject
- Specified by:
clone
in classAbstractDataObject
- Returns:
- copy of object
-
copyOf
public static CCMessageID copyOf(CCMessageID 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:
- CCMessageID
-
getChoice
public CCMessageID.Choice getChoice()
Gets the discriminant of the current choice.- Returns:
- the current discriminant
-
getElementaryMessageID
public int getElementaryMessageID() throws IllegalStateException
Gets the value of the elementaryMessageID choice.- Returns:
- value of the choice, if choice is elementaryMessageID
- Throws:
IllegalStateException
- if choice is not elementaryMessageID
-
getElementaryMessageIDs
public int[] getElementaryMessageIDs()
Gets the value of the elementaryMessageIDs choice.- Returns:
- value of the choice, if choice is elementaryMessageIDs, else null
-
getFieldAccessors
public static FieldAccessor[] getFieldAccessors()
Gets a new array of the accessors for fields of this type.- Returns:
- FieldAccessor[]
-
getFieldsMap
public Map<String,Object> getFieldsMap(boolean withAbsents)
Gets a Map from :discriminant-name to associated-value. For a value of primitive type, the value is boxed. If choice is not set, returns a map from : to AbstractFieldsObject.FIELD_UNINITIALISED.- Specified by:
getFieldsMap
in classAbstractFieldsObject
- Parameters:
withAbsents
- ignored, as value cannot be optional- Returns:
- Map from :discriminant-name to associated-value
-
getText
public CCMessageID.Text getText()
Gets the value of the text choice.- Returns:
- value of the choice, if choice is text, else null
-
getVariableMessage
public CCMessageID.VariableMessage getVariableMessage()
Gets the value of the variableMessage choice.- Returns:
- value of the choice, if choice is variableMessage, else null
-
isElementaryMessageIDChosen
public boolean isElementaryMessageIDChosen()
Tests whether the choice is elementaryMessageID.- Returns:
- true if chosen, false if not
-
isElementaryMessageIDsChosen
public boolean isElementaryMessageIDsChosen()
Tests whether the choice is elementaryMessageIDs.- Returns:
- true if chosen, false if not
-
isTextChosen
public boolean isTextChosen()
Tests whether the choice is text.- Returns:
- true if chosen, false if not
-
isVariableMessageChosen
public boolean isVariableMessageChosen()
Tests whether the choice is variableMessage.- Returns:
- true if chosen, false if not
-
setElementaryMessageID
public CCMessageID setElementaryMessageID(int value) throws IllegalStateException
Sets the value of the elementaryMessageID choice.- Parameters:
value
- the new value for the choice- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setElementaryMessageIDs
public CCMessageID setElementaryMessageIDs(int[] value) throws IllegalStateException, NullPointerException
Sets the value of the elementaryMessageIDs choice.- Parameters:
value
- the new value for the choice- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-onlyNullPointerException
- if the given value is null
-
setReadOnly
public void setReadOnly()
Sets this and all its fields to be immutable.- Specified by:
setReadOnly
in interfaceDataObject
- Overrides:
setReadOnly
in classAbstractDataObject
-
setText
public CCMessageID setText(CCMessageID.Text value) throws IllegalStateException, NullPointerException
Sets the value of the text choice.- Parameters:
value
- the new value for the choice- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-onlyNullPointerException
- if the given value is null
-
setVariableMessage
public CCMessageID setVariableMessage(CCMessageID.VariableMessage value) throws IllegalStateException, NullPointerException
Sets the value of the variableMessage choice.- Parameters:
value
- the new value for the choice- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-onlyNullPointerException
- if the given value is null
-
-