public class CAP4LegOrCallSegment extends AbstractFieldsObject
LegOrCallSegment ::= CHOICE { callSegmentID CallSegmentID, legID LegID }
Used as field type by CAP4PlayToneArg
.
Used as field type by CAP4ContinueWithArgumentArgExtension
.
Modifier and Type | Class and Description |
---|---|
static class |
CAP4LegOrCallSegment.Choice
API for CAP-datatypes.LegOrCallSegment.Choice.
|
FIELD_ABSENT, FIELD_UNINITIALISED
Constructor and Description |
---|
CAP4LegOrCallSegment() |
Modifier and Type | Method and 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.
|
equals, hashCode, toString
checkModify, isReadOnly
public CAP4LegOrCallSegment clone()
clone
in interface DataObject
clone
in class AbstractDataObject
public static CAP4LegOrCallSegment copyOf(CAP4LegOrCallSegment from)
from
- the object from which to copypublic int getCallSegmentID() throws IllegalStateException
IllegalStateException
- if choice is not callSegmentIDpublic CAP4LegOrCallSegment.Choice getChoice()
public static FieldAccessor[] getFieldAccessors()
public Map<String,Object> getFieldsMap(boolean withAbsents)
getFieldsMap
in class AbstractFieldsObject
withAbsents
- ignored, as value cannot be optionalpublic CCLegID getLegID()
public boolean isCallSegmentIDChosen()
public boolean isLegIDChosen()
public CAP4LegOrCallSegment setCallSegmentID(int value) throws IllegalStateException
value
- the new value for the choiceIllegalStateException
- if this instance has been marked as read-onlypublic CAP4LegOrCallSegment setLegID(CCLegID value) throws IllegalStateException, NullPointerException
value
- the new value for the choiceIllegalStateException
- if this instance has been marked as read-onlyNullPointerException
- if the given value is nullpublic void setReadOnly()
setReadOnly
in interface DataObject
setReadOnly
in class AbstractDataObject