Class CAP3ElapsedTime
-
- All Implemented Interfaces:
DataObject
,Serializable
public class CAP3ElapsedTime extends AbstractFieldsObject
API for CAP-datatypes.ElapsedTime. Generated from the following ASN.1 type definition.ElapsedTime ::= CHOICE { timeGPRSIfNoTariffSwitch INTEGER (0..86400), timeGPRSIfTariffSwitch SEQUENCE { timeGPRSSinceLastTariffSwitch INTEGER (0..86400), timeGPRSTariffSwitchInterval INTEGER (0..86400) OPTIONAL } }
Used as field type by
CAP3ChargingResult
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CAP3ElapsedTime.Choice
API for CAP-datatypes.ElapsedTime.Choice.static class
CAP3ElapsedTime.TimeGPRSIfTariffSwitch
API for CAP-datatypes.ElapsedTime.timeGPRSIfTariffSwitch.
-
Field Summary
-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Constructor Description CAP3ElapsedTime()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CAP3ElapsedTime
clone()
Constructs a copy of this object and everything reachable from it.static CAP3ElapsedTime
copyOf(CAP3ElapsedTime 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.CAP3ElapsedTime.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
getTimeGPRSIfNoTariffSwitch()
Gets the value of the timeGPRSIfNoTariffSwitch choice.CAP3ElapsedTime.TimeGPRSIfTariffSwitch
getTimeGPRSIfTariffSwitch()
Gets the value of the timeGPRSIfTariffSwitch choice.boolean
isTimeGPRSIfNoTariffSwitchChosen()
Tests whether the choice is timeGPRSIfNoTariffSwitch.boolean
isTimeGPRSIfTariffSwitchChosen()
Tests whether the choice is timeGPRSIfTariffSwitch.void
setReadOnly()
Sets this and all its fields to be immutable.CAP3ElapsedTime
setTimeGPRSIfNoTariffSwitch(int value)
Sets the value of the timeGPRSIfNoTariffSwitch choice.CAP3ElapsedTime
setTimeGPRSIfTariffSwitch(CAP3ElapsedTime.TimeGPRSIfTariffSwitch value)
Sets the value of the timeGPRSIfTariffSwitch choice.-
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 CAP3ElapsedTime 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 CAP3ElapsedTime copyOf(CAP3ElapsedTime 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:
- CAP3ElapsedTime
-
getChoice
public CAP3ElapsedTime.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
-
getTimeGPRSIfNoTariffSwitch
public int getTimeGPRSIfNoTariffSwitch() throws IllegalStateException
Gets the value of the timeGPRSIfNoTariffSwitch choice.- Returns:
- value of the choice, if choice is timeGPRSIfNoTariffSwitch
- Throws:
IllegalStateException
- if choice is not timeGPRSIfNoTariffSwitch
-
getTimeGPRSIfTariffSwitch
public CAP3ElapsedTime.TimeGPRSIfTariffSwitch getTimeGPRSIfTariffSwitch()
Gets the value of the timeGPRSIfTariffSwitch choice.- Returns:
- value of the choice, if choice is timeGPRSIfTariffSwitch, else null
-
isTimeGPRSIfNoTariffSwitchChosen
public boolean isTimeGPRSIfNoTariffSwitchChosen()
Tests whether the choice is timeGPRSIfNoTariffSwitch.- Returns:
- true if chosen, false if not
-
isTimeGPRSIfTariffSwitchChosen
public boolean isTimeGPRSIfTariffSwitchChosen()
Tests whether the choice is timeGPRSIfTariffSwitch.- Returns:
- true if chosen, false if not
-
setReadOnly
public void setReadOnly()
Sets this and all its fields to be immutable.- Specified by:
setReadOnly
in interfaceDataObject
- Overrides:
setReadOnly
in classAbstractDataObject
-
setTimeGPRSIfNoTariffSwitch
public CAP3ElapsedTime setTimeGPRSIfNoTariffSwitch(int value) throws IllegalStateException
Sets the value of the timeGPRSIfNoTariffSwitch choice.- Parameters:
value
- the new value for the choice- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setTimeGPRSIfTariffSwitch
public CAP3ElapsedTime setTimeGPRSIfTariffSwitch(CAP3ElapsedTime.TimeGPRSIfTariffSwitch value) throws IllegalStateException, NullPointerException
Sets the value of the timeGPRSIfTariffSwitch 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
-
-