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 classCCMessageID.ChoiceAPI for CC-DataTypes.MessageID.Choice.static classCCMessageID.TextAPI for CC-DataTypes.MessageID.text.static classCCMessageID.VariableMessageAPI 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 CCMessageIDclone()Constructs a copy of this object and everything reachable from it.static CCMessageIDcopyOf(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.ChoicegetChoice()Gets the discriminant of the current choice.intgetElementaryMessageID()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.TextgetText()Gets the value of the text choice.CCMessageID.VariableMessagegetVariableMessage()Gets the value of the variableMessage choice.booleanisElementaryMessageIDChosen()Tests whether the choice is elementaryMessageID.booleanisElementaryMessageIDsChosen()Tests whether the choice is elementaryMessageIDs.booleanisTextChosen()Tests whether the choice is text.booleanisVariableMessageChosen()Tests whether the choice is variableMessage.CCMessageIDsetElementaryMessageID(int value)Sets the value of the elementaryMessageID choice.CCMessageIDsetElementaryMessageIDs(int[] value)Sets the value of the elementaryMessageIDs choice.voidsetReadOnly()Sets this and all its fields to be immutable.CCMessageIDsetText(CCMessageID.Text value)Sets the value of the text choice.CCMessageIDsetVariableMessage(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:
clonein interfaceDataObject- Specified by:
clonein 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 IllegalStateExceptionGets 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:
getFieldsMapin 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:
setReadOnlyin interfaceDataObject- Overrides:
setReadOnlyin 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
-
-