Class CAP4LegOrCallSegment
- java.lang.Object
-
- com.opencloud.util.AbstractDataObject
-
- com.opencloud.util.AbstractFieldsObject
-
- CAP4LegOrCallSegment
-
- All Implemented Interfaces:
DataObject
,Serializable
public class CAP4LegOrCallSegment extends AbstractFieldsObject
API for CAP-datatypes.LegOrCallSegment. Generated from the following ASN.1 type definition.LegOrCallSegment ::= CHOICE { callSegmentID CallSegmentID, legID LegID }
Used as field type by
CAP4PlayToneArg
.Used as field type by
CAP4ContinueWithArgumentArgExtension
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CAP4LegOrCallSegment.Choice
API for CAP-datatypes.LegOrCallSegment.Choice.
-
Field Summary
-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Constructor Description CAP4LegOrCallSegment()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CAP4LegOrCallSegment
clone()
Constructs a copy of this object and everything reachable from it.static CAP4LegOrCallSegment
copyOf(CAP4LegOrCallSegment 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
getCallSegmentID()
Gets the value of the callSegmentID choice.CAP4LegOrCallSegment.Choice
getChoice()
Gets the discriminant of the current 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.CCLegID
getLegID()
Gets the value of the legID choice.boolean
isCallSegmentIDChosen()
Tests whether the choice is callSegmentID.boolean
isLegIDChosen()
Tests whether the choice is legID.CAP4LegOrCallSegment
setCallSegmentID(int value)
Sets the value of the callSegmentID choice.CAP4LegOrCallSegment
setLegID(CCLegID value)
Sets the value of the legID choice.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 CAP4LegOrCallSegment 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 CAP4LegOrCallSegment copyOf(CAP4LegOrCallSegment 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:
- CAP4LegOrCallSegment
-
getCallSegmentID
public int getCallSegmentID() throws IllegalStateException
Gets the value of the callSegmentID choice.- Returns:
- value of the choice, if choice is callSegmentID
- Throws:
IllegalStateException
- if choice is not callSegmentID
-
getChoice
public CAP4LegOrCallSegment.Choice getChoice()
Gets the discriminant of the current choice.- Returns:
- the current discriminant
-
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
-
getLegID
public CCLegID getLegID()
Gets the value of the legID choice.- Returns:
- value of the choice, if choice is legID, else null
-
isCallSegmentIDChosen
public boolean isCallSegmentIDChosen()
Tests whether the choice is callSegmentID.- Returns:
- true if chosen, false if not
-
isLegIDChosen
public boolean isLegIDChosen()
Tests whether the choice is legID.- Returns:
- true if chosen, false if not
-
setCallSegmentID
public CAP4LegOrCallSegment setCallSegmentID(int value) throws IllegalStateException
Sets the value of the callSegmentID choice.- Parameters:
value
- the new value for the choice- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setLegID
public CAP4LegOrCallSegment setLegID(CCLegID value) throws IllegalStateException, NullPointerException
Sets the value of the legID 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
-
-