SqlMoney class
a 4dp accurate numeric type for currency operations
this class is equivalent to the ms-sql datatype money and also the same as Delphi type Currency. all values are stored as a big in with a 4dp multiplier and kept accurate to 4dp suitable for financial application SqlMoney can accept all num types and strings containing numbers
- Implemented types
Properties
Methods
-
abs(
) → SqlMoney -
ceil(
) → SqlMoney - Returns the least integer value that is no smaller than this num.
-
ceilToDouble(
) → double -
Returns the least integer value no smaller than
this
. -
compareTo(
SqlMoney other) → int -
Compares this object to another object.
override
-
floor(
) → SqlMoney - Returns the greatest integer value no greater than this num.
-
floorToDouble(
) → double -
Returns the greatest integer value no greater than
this
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remainder(
Object other) → SqlMoney -
Return the remainder from dividing this num by
other
. -
round(
) → SqlMoney - Returns the integer value closest to this num.
-
roundToDouble(
) → double -
Returns the integer value closest to
this
. -
toString(
) → String -
A string representation of this object.
override
-
toString2Dp(
) → String -
toStringAsFixed(
int fractionDigits) → String -
toStringNoPadding(
) → String - return the shortest possible string for the value eg 1.2500 => "1.25" 1.0000 => "1"
-
truncate(
) → SqlMoney - Returns the integer value obtained by discarding any fractional digits from this num.
Operators
-
operator %(
Object other) → SqlMoney -
operator *(
Object other) → SqlMoney -
operator +(
Object other) → SqlMoney -
operator -(
Object other) → SqlMoney -
operator /(
Object other) → SqlMoney -
operator <(
Object other) → bool - Relational less than operator.
-
operator <=(
Object other) → bool - Relational less than or equal operator.
-
operator ==(
Object other) → bool -
The equality operator.
override
-
operator >(
Object other) → bool - Relational greater than operator.
-
operator >=(
Object other) → bool - Relational greater than or equal operator.
-
operator unary-(
) → SqlMoney -
operator ~/(
Object other) → SqlMoney
Static Methods
-
compare(
Comparable a, Comparable b) → int -
A Comparator that compares one comparable to another.
override
-
parseWithDefault(
String value, SqlMoney defaultValue) → SqlMoney -
tryParse(
String value) → SqlMoney?