Enum Class Occurrence
- All Implemented Interfaces:
Serializable
,Comparable<Occurrence>
,Constable
,Unit<Occurrence>
Represents the frequency unit. Supported Unit is "Occ".
- Version:
- 1.0
- Author:
- ashsriva
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface oracle.communication.brm.charging.util.unit.Unit
Unit.UnitMisMatchException
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsFields inherited from interface oracle.communication.brm.charging.util.unit.Unit
MATH_CONTEXT
-
Method Summary
Modifier and TypeMethodDescriptionconvert
(UnitValue<Occurrence> otherValue) Returns an instance of the UnitValue with this Unit converted according to a specific ratiostatic UnitValue
<Occurrence> createValueFromUnitString
(String unitString, BigDecimal theValue) helper method used to choose the correct UOM and set the value.long
Deprecated.static Occurrence
Returns the enum constant of this class with the specified name.Returns an instance of the UnitValue with this Unit and provided quantitystatic Occurrence[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Occ
-
-
Field Details
-
ALLOWABLE_OCCURENCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getRatio
Deprecated.Description copied from interface:Unit
NOTE: for backward compatibility, actually obsolete Deprecated, use convert instead The method returns the ratio of numeric conversion between the this and the passed unit. The method throws Unit.UnitMisMatchException if ratio between the two units is not supported.- Specified by:
getRatio
in interfaceUnit<Occurrence>
- Parameters:
o
- Occurrence Unit- Returns:
- long Always returns 1 as occurrence types are not supported. TODO: this method should be made private, it is still public here to provide backward compatibility to customers who are potentially still using it.
-
valueOf
Returns an instance of the UnitValue with this Unit and provided quantity- Specified by:
valueOf
in interfaceUnit<Occurrence>
- Parameters:
b
- BigDecimal- Returns:
- UnitValue
-
convert
Returns an instance of the UnitValue with this Unit converted according to a specific ratio- Specified by:
convert
in interfaceUnit<Occurrence>
- Parameters:
otherValue
- UnitValue unit value to convert to- Returns:
- UnitValue unit value resulting from conversion of otherValue to the unit
-
createValueFromUnitString
public static UnitValue<Occurrence> createValueFromUnitString(String unitString, BigDecimal theValue) helper method used to choose the correct UOM and set the value.- Parameters:
unitString
- the UOM for the Data valuetheValue
- the data value- Returns:
- returns the newly created UnitValue
from the supplied values.
-