Class Currency
java.lang.Object
com.aquima.interactions.foundation.types.AbstractValue
com.aquima.interactions.foundation.types.NumberValue
com.aquima.interactions.foundation.types.Currency
- All Implemented Interfaces:
IConvertable
,IPrimitiveValue
,ISingleValue
,IValue
,Serializable
,Comparable<Object>
- Direct Known Subclasses:
AttributeCurrency
This class represents a single currency value.
- Since:
- 6.3
- Author:
- O. Kerpershoek
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Currency
This member defines the UNKNOWN value for the currency type.Fields inherited from class com.aquima.interactions.foundation.types.NumberValue
EQUALS_MARGIN
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Currency()
Currency
(double doubleValue) Constructs the currency value with a double containing the actual value.Currency
(IMultilingualText displayValue, double doubleValue) Constructs the Currency with a display text.Copy constructor.Currency
(String typeName, IMultilingualText displayValue, double doubleValue) Constructs the Currency as a domain value. -
Method Summary
Modifier and TypeMethodDescriptionforType
(String typeName, IMultilingualText displayValue) This method adds the type and display information to the value, and returns the value with this added information.This method returns the data type of the value.static double
parseCurrency
(Object obj) toString()
static NumberValue
Methods inherited from class com.aquima.interactions.foundation.types.NumberValue
booleanValue, compareSimple, contains, dateValue, doubleCompare, doubleValue, duplicate, equals, getValue, hashCode, integerValue, isUnknown, longValue, parseDouble, stringValue
Methods inherited from class com.aquima.interactions.foundation.types.AbstractValue
compareTo, getDisplayValue, getTypeName, isRangeValue, isSingleValue, toListValue, toRangeValue, toSingleValue
-
Field Details
-
UNKNOWN
This member defines the UNKNOWN value for the currency type.
-
-
Constructor Details
-
Currency
protected Currency() -
Currency
public Currency(double doubleValue) Constructs the currency value with a double containing the actual value.- Parameters:
doubleValue
- The actual value of the currency.
-
Currency
Copy constructor.- Parameters:
other
- value to copy.
-
Currency
Constructs the Currency with a display text.- Parameters:
displayValue
- Text object containing the display value that should be used.doubleValue
- a double containing the actual value.
-
Currency
Constructs the Currency as a domain value.- Parameters:
typeName
- The name of the domain the value belongs to.displayValue
- Text object containing the display value that should be used.doubleValue
- a double containing the actual value.
-
-
Method Details
-
valueOf
-
parseCurrency
-
forType
Description copied from interface:IPrimitiveValue
This method adds the type and display information to the value, and returns the value with this added information. The method will not change the state of the value the method is invoked on, but it will return a copy of the current value with the added information.- Specified by:
forType
in interfaceIPrimitiveValue
- Overrides:
forType
in classNumberValue
- Parameters:
typeName
- The type of the value.displayValue
- Multilingual text containing display values.- Returns:
- The value with the added information.
-
getDataType
Description copied from interface:IValue
This method returns the data type of the value.- Specified by:
getDataType
in interfaceIValue
- Overrides:
getDataType
in classNumberValue
- Returns:
- The data type of the value.
-
toString
- Overrides:
toString
in classNumberValue
-