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
    • Constructor Detail

      • CCMessageID

        public CCMessageID()
    • Method Detail

      • 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 class AbstractFieldsObject
        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