public class CAP2TimeInformation extends AbstractFieldsObject
TimeInformation ::=
CHOICE {
timeIfNoTariffSwitch TimeIfNoTariffSwitch,
timeIfTariffSwitch TimeIfTariffSwitch
}
Used as field type by CAP2CAMEL_CallResult.TimeDurationChargingResult.
| Modifier and Type | Class and Description |
|---|---|
static class |
CAP2TimeInformation.Choice
API for CAP-DataTypes.TimeInformation.Choice.
|
FIELD_ABSENT, FIELD_UNINITIALISED| Constructor and Description |
|---|
CAP2TimeInformation() |
| Modifier and Type | Method and Description |
|---|---|
CAP2TimeInformation |
clone()
Constructs a copy of this object and everything reachable from it.
|
static CAP2TimeInformation |
copyOf(CAP2TimeInformation 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.
|
CAP2TimeInformation.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.
|
int |
getTimeIfNoTariffSwitch()
Gets the value of the timeIfNoTariffSwitch choice.
|
CAP2TimeIfTariffSwitch |
getTimeIfTariffSwitch()
Gets the value of the timeIfTariffSwitch choice.
|
boolean |
isTimeIfNoTariffSwitchChosen()
Tests whether the choice is timeIfNoTariffSwitch.
|
boolean |
isTimeIfTariffSwitchChosen()
Tests whether the choice is timeIfTariffSwitch.
|
void |
setReadOnly()
Sets this and all its fields to be immutable.
|
CAP2TimeInformation |
setTimeIfNoTariffSwitch(int value)
Sets the value of the timeIfNoTariffSwitch choice.
|
CAP2TimeInformation |
setTimeIfTariffSwitch(CAP2TimeIfTariffSwitch value)
Sets the value of the timeIfTariffSwitch choice.
|
equals, hashCode, toStringcheckModify, isReadOnlypublic CAP2TimeInformation clone()
clone in interface DataObjectclone in class AbstractDataObjectpublic static CAP2TimeInformation copyOf(CAP2TimeInformation from)
from - the object from which to copypublic CAP2TimeInformation.Choice getChoice()
public static FieldAccessor[] getFieldAccessors()
public Map<String,Object> getFieldsMap(boolean withAbsents)
getFieldsMap in class AbstractFieldsObjectwithAbsents - ignored, as value cannot be optionalpublic int getTimeIfNoTariffSwitch()
throws IllegalStateException
IllegalStateException - if choice is not timeIfNoTariffSwitchpublic CAP2TimeIfTariffSwitch getTimeIfTariffSwitch()
public boolean isTimeIfNoTariffSwitchChosen()
public boolean isTimeIfTariffSwitchChosen()
public void setReadOnly()
setReadOnly in interface DataObjectsetReadOnly in class AbstractDataObjectpublic CAP2TimeInformation setTimeIfNoTariffSwitch(int value) throws IllegalStateException
value - the new value for the choiceIllegalStateException - if this instance has been marked as read-onlypublic CAP2TimeInformation setTimeIfTariffSwitch(CAP2TimeIfTariffSwitch 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 null