Package com.storedobject.core
Class Money.List
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a monetary value to this list.add
(Money.List moneyList) Add a monetary values from another list.boolean
isZero()
Whether all entries of this list contain zeros only or not.negate()
Create a negated list from this list.Subtract a monetary value from this list.subtract
(Money.List moneyList) Subtract monetary values from this list.Get the effective monetary value in a given currency.toLocal
(SystemEntity systemEntity) Convert to a local currency value.Convert to a local currency value.toString()
This will return the result of toString(false).toString
(boolean withZeros) Stringify.Stringify.Methods inherited from class java.util.Hashtable
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
List
public List()
-
-
Method Details
-
add
Add a monetary value to this list. (If an entry for the same currency already exists, this monetary value will be added to that entry).- Parameters:
money
- Money to be added.- Returns:
- Self reference.
-
add
Add a monetary values from another list. Seeadd(Money)
.- Parameters:
moneyList
- Money list to be added.- Returns:
- Self reference.
-
subtract
Subtract a monetary value from this list. (If an entry for the same currency already exists, this monetary value will be subtracted from that entry).- Parameters:
money
- Money to be added.- Returns:
- Self reference.
-
subtract
Subtract monetary values from this list. Seesubtract(Money)
.- Parameters:
moneyList
- Money list to be subtracted.- Returns:
- Self reference.
-
isZero
public boolean isZero()Whether all entries of this list contain zeros only or not.- Returns:
- True/false.
-
negate
-
to
-
toString
-
toString
Stringify. Each entry will appear in a new line.- Parameters:
withZeros
- Whether to include zeros or not.- Returns:
- Stringified value.
-
toString
-
toLocal
Convert to a local currency value.- Parameters:
tm
- Transaction Manager.- Returns:
- Value converted into the local currency equivalent by applying appropriate currency rate.
-
toLocal
Convert to a local currency value.- Parameters:
systemEntity
- System Entity.- Returns:
- Value converted into the local currency equivalent by applying appropriate currency rate.
-