Class Money
java.lang.Object
oracle.communication.brm.charging.util.directevolution.DAbstractEvolvable
oracle.communication.brm.charging.util.unit.Money
- All Implemented Interfaces:
Serializable
,Cloneable
,oracle.communication.brm.charging.util.directevolution.DEvolvable
,Unit<Money>
public class Money
extends oracle.communication.brm.charging.util.directevolution.DAbstractEvolvable
implements Unit<Money>
Class presents a Unit that represents a Currency. Each Unit has a Currency
and its associated symbol.
- Version:
- 1.0
- Author:
- ashsriva
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface oracle.communication.brm.charging.util.unit.Unit
Unit.UnitMisMatchException
-
Field Summary
Fields inherited from interface oracle.communication.brm.charging.util.unit.Unit
MATH_CONTEXT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an instance of the UnitValue with this Unit converted according to a specific ratiooracle.communication.brm.charging.util.directevolution.DEvolvable
boolean
Returns the Currencylong
Deprecated.void
giveInitializerTo
(oracle.communication.brm.charging.util.directevolution.DEvolvableHelper evolvableHelper) int
hashCode()
Creates an instance of Money of type Currency with the passed symbol.toString()
Returns an instance of the UnitValue with this Unit and provided quantityMethods inherited from class oracle.communication.brm.charging.util.directevolution.DAbstractEvolvable
clone, getEvolutionData, setEvolutionData
-
Constructor Details
-
Money
public Money()Default constructor required for evolution -
Money
Constructor- Parameters:
cur
- Currency
-
-
Method Details
-
createInstance
public oracle.communication.brm.charging.util.directevolution.DEvolvable createInstance()- Specified by:
createInstance
in interfaceoracle.communication.brm.charging.util.directevolution.DEvolvable
-
giveInitializerTo
public void giveInitializerTo(oracle.communication.brm.charging.util.directevolution.DEvolvableHelper evolvableHelper) - Specified by:
giveInitializerTo
in interfaceoracle.communication.brm.charging.util.directevolution.DEvolvable
-
getCurrency
Returns the Currency- Returns:
- Currency
-
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<Money>
- Parameters:
d
- Money- Returns:
- long either 1 if two Money are represented in the same currency code The Money class does not support 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 -
convert
Returns an instance of the UnitValue with this Unit converted according to a specific ratio -
money
Creates an instance of Money of type Currency with the passed symbol.- Parameters:
count
- The amount of Moneysymbol
- The Currency currency code like USD.- Returns:
- UnitValue of type Money
-
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toString
in classoracle.communication.brm.charging.util.directevolution.DAbstractEvolvable
-