public class CAP3TransferredVolume extends AbstractFieldsObject
TransferredVolume ::= CHOICE { volumeIfNoTariffSwitch INTEGER (0..4294967295), volumeIfTariffSwitch SEQUENCE { volumeSinceLastTariffSwitch INTEGER (0..4294967295), volumeTariffSwitchInterval INTEGER (0..4294967295) OPTIONAL } }
Used as field type by CAP3ChargingResult
.
Modifier and Type | Class and Description |
---|---|
static class |
CAP3TransferredVolume.Choice
API for CAP-datatypes.TransferredVolume.Choice.
|
static class |
CAP3TransferredVolume.VolumeIfTariffSwitch
API for CAP-datatypes.TransferredVolume.volumeIfTariffSwitch.
|
FIELD_ABSENT, FIELD_UNINITIALISED
Constructor and Description |
---|
CAP3TransferredVolume() |
Modifier and Type | Method and Description |
---|---|
CAP3TransferredVolume |
clone()
Constructs a copy of this object and everything reachable from it.
|
static CAP3TransferredVolume |
copyOf(CAP3TransferredVolume 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.
|
CAP3TransferredVolume.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.
|
long |
getVolumeIfNoTariffSwitch()
Gets the value of the volumeIfNoTariffSwitch choice.
|
CAP3TransferredVolume.VolumeIfTariffSwitch |
getVolumeIfTariffSwitch()
Gets the value of the volumeIfTariffSwitch choice.
|
boolean |
isVolumeIfNoTariffSwitchChosen()
Tests whether the choice is volumeIfNoTariffSwitch.
|
boolean |
isVolumeIfTariffSwitchChosen()
Tests whether the choice is volumeIfTariffSwitch.
|
void |
setReadOnly()
Sets this and all its fields to be immutable.
|
CAP3TransferredVolume |
setVolumeIfNoTariffSwitch(long value)
Sets the value of the volumeIfNoTariffSwitch choice.
|
CAP3TransferredVolume |
setVolumeIfTariffSwitch(CAP3TransferredVolume.VolumeIfTariffSwitch value)
Sets the value of the volumeIfTariffSwitch choice.
|
equals, hashCode, toString
checkModify, isReadOnly
public CAP3TransferredVolume clone()
clone
in interface DataObject
clone
in class AbstractDataObject
public static CAP3TransferredVolume copyOf(CAP3TransferredVolume from)
from
- the object from which to copypublic CAP3TransferredVolume.Choice getChoice()
public static FieldAccessor[] getFieldAccessors()
public Map<String,Object> getFieldsMap(boolean withAbsents)
getFieldsMap
in class AbstractFieldsObject
withAbsents
- ignored, as value cannot be optionalpublic long getVolumeIfNoTariffSwitch() throws IllegalStateException
IllegalStateException
- if choice is not volumeIfNoTariffSwitchpublic CAP3TransferredVolume.VolumeIfTariffSwitch getVolumeIfTariffSwitch()
public boolean isVolumeIfNoTariffSwitchChosen()
public boolean isVolumeIfTariffSwitchChosen()
public void setReadOnly()
setReadOnly
in interface DataObject
setReadOnly
in class AbstractDataObject
public CAP3TransferredVolume setVolumeIfNoTariffSwitch(long value) throws IllegalStateException
value
- the new value for the choiceIllegalStateException
- if this instance has been marked as read-onlypublic CAP3TransferredVolume setVolumeIfTariffSwitch(CAP3TransferredVolume.VolumeIfTariffSwitch 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