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
    • Constructor Detail

      • CAP3ElapsedTime

        public CAP3ElapsedTime()
    • Method Detail

      • 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 class AbstractFieldsObject
        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
      • 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