Class CAP4Burst
-
- All Implemented Interfaces:
DataObject
,Serializable
public class CAP4Burst extends AbstractFieldsObject
API for CAP-datatypes.Burst. Generated from the following ASN.1 type definition.Burst ::= SEQUENCE { numberOfBursts INTEGER (1..3) DEFAULT 1, burstInterval INTEGER (1..1200) DEFAULT 2, numberOfTonesInBurst INTEGER (1..3) DEFAULT 3, toneDuration INTEGER (1..20) DEFAULT 2, toneInterval INTEGER (1..20) DEFAULT 2, ... }
Used as field type by
CAP4BurstList
.Used as field type by
CAP4PlayToneArg
.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Constructor Description CAP4Burst()
Constructs an object with uninitialised state.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CAP4Burst
clone()
Constructs a copy of this object and everything reachable from it.static CAP4Burst
copyOf(CAP4Burst 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
getBurstInterval()
Gets the value of the field burstInterval.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 field-name to field-value.int
getNumberOfBursts()
Gets the value of the field numberOfBursts.int
getNumberOfTonesInBurst()
Gets the value of the field numberOfTonesInBurst.int
getToneDuration()
Gets the value of the field toneDuration.int
getToneInterval()
Gets the value of the field toneInterval.boolean
hasBurstInterval()
Tests whether the field burstInterval has a value.boolean
hasNumberOfBursts()
Tests whether the field numberOfBursts has a value.boolean
hasNumberOfTonesInBurst()
Tests whether the field numberOfTonesInBurst has a value.boolean
hasToneDuration()
Tests whether the field toneDuration has a value.boolean
hasToneInterval()
Tests whether the field toneInterval has a value.CAP4Burst
setBurstInterval(int value)
Sets the value of the field burstInterval and marks the field as present.CAP4Burst
setBurstIntervalPresent(boolean flag)
Sets the presence or absence of the optional field burstInterval.CAP4Burst
setNumberOfBursts(int value)
Sets the value of the field numberOfBursts and marks the field as present.CAP4Burst
setNumberOfBurstsPresent(boolean flag)
Sets the presence or absence of the optional field numberOfBursts.CAP4Burst
setNumberOfTonesInBurst(int value)
Sets the value of the field numberOfTonesInBurst and marks the field as present.CAP4Burst
setNumberOfTonesInBurstPresent(boolean flag)
Sets the presence or absence of the optional field numberOfTonesInBurst.CAP4Burst
setToneDuration(int value)
Sets the value of the field toneDuration and marks the field as present.CAP4Burst
setToneDurationPresent(boolean flag)
Sets the presence or absence of the optional field toneDuration.CAP4Burst
setToneInterval(int value)
Sets the value of the field toneInterval and marks the field as present.CAP4Burst
setToneIntervalPresent(boolean flag)
Sets the presence or absence of the optional field toneInterval.-
Methods inherited from class com.opencloud.util.AbstractFieldsObject
equals, hashCode, toString
-
Methods inherited from class com.opencloud.util.AbstractDataObject
checkModify, isReadOnly, setReadOnly
-
-
-
-
Method Detail
-
clone
public CAP4Burst 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 CAP4Burst copyOf(CAP4Burst 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:
- CAP4Burst
-
getBurstInterval
public int getBurstInterval()
Gets the value of the field burstInterval.- Returns:
- value of field burstInterval
-
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 field-name to field-value. For a field of primitive type, the field-value is boxed. For an absent optional field, the field-value is AbstractFieldsObject.FIELD_ABSENT. For an unitialised mandatory field, the field-value is AbstractFieldsObject.FIELD_UNINITIALISED.- Specified by:
getFieldsMap
in classAbstractFieldsObject
- Parameters:
withAbsents
- whether to put absent optional fields into Map- Returns:
- Map from field-name to field-value
-
getNumberOfBursts
public int getNumberOfBursts()
Gets the value of the field numberOfBursts.- Returns:
- value of field numberOfBursts
-
getNumberOfTonesInBurst
public int getNumberOfTonesInBurst()
Gets the value of the field numberOfTonesInBurst.- Returns:
- value of field numberOfTonesInBurst
-
getToneDuration
public int getToneDuration()
Gets the value of the field toneDuration.- Returns:
- value of field toneDuration
-
getToneInterval
public int getToneInterval()
Gets the value of the field toneInterval.- Returns:
- value of field toneInterval
-
hasBurstInterval
public boolean hasBurstInterval()
Tests whether the field burstInterval has a value.- Returns:
- whether the field burstInterval has a value
-
hasNumberOfBursts
public boolean hasNumberOfBursts()
Tests whether the field numberOfBursts has a value.- Returns:
- whether the field numberOfBursts has a value
-
hasNumberOfTonesInBurst
public boolean hasNumberOfTonesInBurst()
Tests whether the field numberOfTonesInBurst has a value.- Returns:
- whether the field numberOfTonesInBurst has a value
-
hasToneDuration
public boolean hasToneDuration()
Tests whether the field toneDuration has a value.- Returns:
- whether the field toneDuration has a value
-
hasToneInterval
public boolean hasToneInterval()
Tests whether the field toneInterval has a value.- Returns:
- whether the field toneInterval has a value
-
setBurstInterval
public CAP4Burst setBurstInterval(int value) throws IllegalStateException
Sets the value of the field burstInterval and marks the field as present.- Parameters:
value
- the new value for the field- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setBurstIntervalPresent
public CAP4Burst setBurstIntervalPresent(boolean flag) throws IllegalStateException
Sets the presence or absence of the optional field burstInterval.- Parameters:
flag
- either true if the field should be marked as present or false if the field should be marked as absent- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setNumberOfBursts
public CAP4Burst setNumberOfBursts(int value) throws IllegalStateException
Sets the value of the field numberOfBursts and marks the field as present.- Parameters:
value
- the new value for the field- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setNumberOfBurstsPresent
public CAP4Burst setNumberOfBurstsPresent(boolean flag) throws IllegalStateException
Sets the presence or absence of the optional field numberOfBursts.- Parameters:
flag
- either true if the field should be marked as present or false if the field should be marked as absent- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setNumberOfTonesInBurst
public CAP4Burst setNumberOfTonesInBurst(int value) throws IllegalStateException
Sets the value of the field numberOfTonesInBurst and marks the field as present.- Parameters:
value
- the new value for the field- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setNumberOfTonesInBurstPresent
public CAP4Burst setNumberOfTonesInBurstPresent(boolean flag) throws IllegalStateException
Sets the presence or absence of the optional field numberOfTonesInBurst.- Parameters:
flag
- either true if the field should be marked as present or false if the field should be marked as absent- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setToneDuration
public CAP4Burst setToneDuration(int value) throws IllegalStateException
Sets the value of the field toneDuration and marks the field as present.- Parameters:
value
- the new value for the field- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setToneDurationPresent
public CAP4Burst setToneDurationPresent(boolean flag) throws IllegalStateException
Sets the presence or absence of the optional field toneDuration.- Parameters:
flag
- either true if the field should be marked as present or false if the field should be marked as absent- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setToneInterval
public CAP4Burst setToneInterval(int value) throws IllegalStateException
Sets the value of the field toneInterval and marks the field as present.- Parameters:
value
- the new value for the field- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
setToneIntervalPresent
public CAP4Burst setToneIntervalPresent(boolean flag) throws IllegalStateException
Sets the presence or absence of the optional field toneInterval.- Parameters:
flag
- either true if the field should be marked as present or false if the field should be marked as absent- Returns:
- this
- Throws:
IllegalStateException
- if this instance has been marked as read-only
-
-