Money class
@fileoverview A model which can represent money. Will be wrong for yen.
- Implemented types
Constructors
- Money(int value)
- Value in cents
- Money.fromDollars(int dollars, int cents)
-
factory
Properties
Methods
-
getPercentageMore(
Money other) → int - Returns a approximation of many percent more than other money object, out of 100, as int
-
marshal(
MarshalledObject marshalled) → void -
serialise to this object.
override
-
min(
Money minimum) → Money - Returns input parameter if greater than self
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator *(
int quantity) → Money - Multiply money time quantity
-
operator +(
Money other) → Money - Add money
-
operator -(
Money other) → Money - Subtract money
-
operator ==(
Object other) → bool -
The equality operator.
override