Class CCInbandInfo
-
- All Implemented Interfaces:
DataObject
,Serializable
public class CCInbandInfo extends AbstractFieldsObject
API for CC-DataTypes.InbandInfo. Generated from the following ASN.1 type definition.InbandInfo ::= SEQUENCE { messageID MessageID, numberOfRepetitions INTEGER (1..127) OPTIONAL, duration INTEGER (0..32767) OPTIONAL, interval INTEGER (0..32767) OPTIONAL }
Used as field type by
CCInformationToSend
.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Constructor Description CCInbandInfo()
Constructs an object with uninitialised state.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CCInbandInfo
clone()
Constructs a copy of this object and everything reachable from it.static CCInbandInfo
copyOf(CCInbandInfo 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.int
getDuration()
Gets the value of the field duration.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 field-name to field-value.int
getInterval()
Gets the value of the field interval.CCMessageID
getMessageID()
Gets the value of the field messageID.int
getNumberOfRepetitions()
Gets the value of the field numberOfRepetitions.boolean
hasDuration()
Tests whether the field duration has a value.boolean
hasInterval()
Tests whether the field interval has a value.boolean
hasMessageID()
Tests whether the field messageID has a value.boolean
hasNumberOfRepetitions()
Tests whether the field numberOfRepetitions has a value.CCInbandInfo
setDuration(int value)
Sets the value of the field duration and marks the field as present.CCInbandInfo
setDurationPresent(boolean flag)
Sets the presence or absence of the optional field duration.CCInbandInfo
setInterval(int value)
Sets the value of the field interval and marks the field as present.CCInbandInfo
setIntervalPresent(boolean flag)
Sets the presence or absence of the optional field interval.CCInbandInfo
setMessageID(CCMessageID value)
Sets the value of the field messageID.CCInbandInfo
setNumberOfRepetitions(int value)
Sets the value of the field numberOfRepetitions and marks the field as present.CCInbandInfo
setNumberOfRepetitionsPresent(boolean flag)
Sets the presence or absence of the optional field numberOfRepetitions.void
setReadOnly()
Sets this and all its fields to be immutable.-
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 CCInbandInfo 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 CCInbandInfo copyOf(CCInbandInfo 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:
- CCInbandInfo
-
getDuration
public int getDuration()
Gets the value of the field duration.- Returns:
- value of field duration
-
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 field-name to field-value. For a field of primitive type, the field-value is boxed. For an absent optional field, the field-value is AbstractFieldsObject.FIELD_ABSENT. For an unitialised mandatory field, the field-value is AbstractFieldsObject.FIELD_UNINITIALISED.- Specified by:
getFieldsMap
in classAbstractFieldsObject
- Parameters:
withAbsents
- whether to put absent optional fields into Map- Returns:
- Map from field-name to field-value
-
getInterval
public int getInterval()
Gets the value of the field interval.- Returns:
- value of field interval
-
getMessageID
public CCMessageID getMessageID()
Gets the value of the field messageID.- Returns:
- value of field messageID, or null if not present
-
getNumberOfRepetitions
public int getNumberOfRepetitions()
Gets the value of the field numberOfRepetitions.- Returns:
- value of field numberOfRepetitions
-
hasDuration
public boolean hasDuration()
Tests whether the field duration has a value.- Returns:
- whether the field duration has a value
-
hasInterval
public boolean hasInterval()
Tests whether the field interval has a value.- Returns:
- whether the field interval has a value
-
hasMessageID
public boolean hasMessageID()
Tests whether the field messageID has a value.- Returns:
- whether the field messageID has a value
-
hasNumberOfRepetitions
public boolean hasNumberOfRepetitions()
Tests whether the field numberOfRepetitions has a value.- Returns:
- whether the field numberOfRepetitions has a value
-
setDuration
public CCInbandInfo setDuration(int value) throws IllegalStateException
Sets the value of the field duration and marks the field as present.- Parameters:
value
- the new value for the field- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setDurationPresent
public CCInbandInfo setDurationPresent(boolean flag) throws IllegalStateException
Sets the presence or absence of the optional field duration.- Parameters:
flag
- either true if the field should be marked as present or false if the field should be marked as absent- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setInterval
public CCInbandInfo setInterval(int value) throws IllegalStateException
Sets the value of the field interval and marks the field as present.- Parameters:
value
- the new value for the field- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setIntervalPresent
public CCInbandInfo setIntervalPresent(boolean flag) throws IllegalStateException
Sets the presence or absence of the optional field interval.- Parameters:
flag
- either true if the field should be marked as present or false if the field should be marked as absent- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setMessageID
public CCInbandInfo setMessageID(CCMessageID value) throws IllegalStateException
Sets the value of the field messageID.- Parameters:
value
- the new value for the field- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setNumberOfRepetitions
public CCInbandInfo setNumberOfRepetitions(int value) throws IllegalStateException
Sets the value of the field numberOfRepetitions and marks the field as present.- Parameters:
value
- the new value for the field- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setNumberOfRepetitionsPresent
public CCInbandInfo setNumberOfRepetitionsPresent(boolean flag) throws IllegalStateException
Sets the presence or absence of the optional field numberOfRepetitions.- Parameters:
flag
- either true if the field should be marked as present or false if the field should be marked as absent- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setReadOnly
public void setReadOnly()
Sets this and all its fields to be immutable.- Specified by:
setReadOnly
in interfaceDataObject
- Overrides:
setReadOnly
in classAbstractDataObject
-
-