Decimal class final
See the Rust documentation for Decimal for more information.
- Implemented types
Constructors
- Decimal.fromDoubleWithLowerMagnitude(double f, int magnitude)
-
Construct an Decimal from an float, with a given power of 10 for the lower magnitude
factory
- Decimal.fromDoubleWithRoundTripPrecision(double f)
-
Construct an Decimal from an float, with enough digits to recover
the original floating point in IEEE 754 without needing trailing zeros
factory
- Decimal.fromDoubleWithSignificantDigits(double f, int digits)
-
Construct an Decimal from an float, for a given number of significant digits
factory
- Decimal.fromInt(int v)
-
Construct an Decimal from an integer.
factory
- Decimal.fromString(String v)
-
Construct an Decimal from a string.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isZero → bool
-
See the Rust documentation for
is_zerofor more information.no setter - magnitudeEnd → int
-
See the Rust documentation for
magnitude_rangefor more information.no setter - magnitudeStart → int
-
See the Rust documentation for
magnitude_rangefor more information.no setter - nonzeroMagnitudeEnd → int
-
See the Rust documentation for
nonzero_magnitude_endfor more information.no setter - nonzeroMagnitudeStart → int
-
See the Rust documentation for
nonzero_magnitude_startfor more information.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sign ↔ DecimalSign
-
See the Rust documentation for
signfor more information.getter/setter pair
Methods
-
applySignDisplay(
DecimalSignDisplay signDisplay) → void -
See the Rust documentation for
apply_sign_displayfor more information. -
ceil(
int position) → void -
See the Rust documentation for
ceilfor more information. -
concatenateEnd(
Decimal other) → bool -
Concatenates
otherto the end ofself. -
digitAt(
int magnitude) → int -
See the Rust documentation for
digit_atfor more information. -
expand(
int position) → void -
See the Rust documentation for
expandfor more information. -
floor(
int position) → void -
See the Rust documentation for
floorfor more information. -
multiplyPow10(
int power) → void - Multiply the Decimal by a given power of ten.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
padEnd(
int position) → void - Zero-pad the Decimal on the right to a particular position
-
padStart(
int position) → void - Zero-pad the Decimal on the left to a particular position
-
round(
int position) → void - Round the number at a particular digit position.
-
roundWithMode(
int position, DecimalSignedRoundingMode mode) → void -
See the Rust documentation for
round_with_modefor more information. -
roundWithModeAndIncrement(
int position, DecimalSignedRoundingMode mode, DecimalRoundingIncrement increment) → void -
See the Rust documentation for
round_with_mode_and_incrementfor more information. -
setMaxPosition(
int position) → void - Truncate the Decimal on the left to a particular position, deleting digits if necessary. This is useful for, e.g. abbreviating years ("2022" -> "22")
-
toString(
) → String -
Format the Decimal as a string.
override
-
trimEnd(
) → void -
See the Rust documentation for
trim_endfor more information. -
trimEndIfInteger(
) → void -
See the Rust documentation for
trim_end_if_integerfor more information. -
trimStart(
) → void -
See the Rust documentation for
trim_startfor more information. -
trunc(
int position) → void -
See the Rust documentation for
truncfor more information.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited