java.lang.Object
de.powerstat.validation.values.Currency
- All Implemented Interfaces:
IValueObject,Comparable<Currency>
Currency ISO 4217 codes.
Not DSGVO relevant.
TODO Translations
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
CURRENCY_REGEXP
Currency regexp. -
code
ISO 4217 currency code.
-
-
Constructor Details
-
Currency
Constructor.- Parameters:
code- ISO 4217 code- Throws:
NullPointerException- if code is nullIllegalArgumentException- if code is not a known 4217 code
-
-
Method Details
-
of
Currency factory.- Parameters:
code- 4217 code- Returns:
- Currency object
-
stringValue
Returns the value of this Currency as a ISO 4217 string.- Specified by:
stringValuein interfaceIValueObject- Returns:
- The text value represented by this object after conversion to type string.
-
hashCode
public int hashCode()Calculate hash code. -
equals
Is equal with another object. -
toString
Returns the string representation of this Currency. The exact details of this representation are unspecified and subject to change, but the following may be regarded as typical: "Currency[code=EUR]" -
compareTo
Compare with another object.- Specified by:
compareToin interfaceComparable<Currency>- Parameters:
obj- Object to compare with- Returns:
- 0: equal; 1: greater; -1: smaller
- See Also:
-