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_zero
for more information.no setter - magnitudeEnd → int
-
See the Rust documentation for
magnitude_range
for more information.no setter - magnitudeStart → int
-
See the Rust documentation for
magnitude_range
for more information.no setter - nonzeroMagnitudeEnd → int
-
See the Rust documentation for
nonzero_magnitude_end
for more information.no setter - nonzeroMagnitudeStart → int
-
See the Rust documentation for
nonzero_magnitude_start
for more information.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sign ↔ DecimalSign
-
See the Rust documentation for
sign
for more information.getter/setter pair
Methods
-
applySignDisplay(
DecimalSignDisplay signDisplay) → void -
See the Rust documentation for
apply_sign_display
for more information. -
ceil(
int position) → void -
See the Rust documentation for
ceil
for more information. -
concatenateEnd(
Decimal other) → bool -
Concatenates
other
to the end ofself
. -
digitAt(
int magnitude) → int -
See the Rust documentation for
digit_at
for more information. -
expand(
int position) → void -
See the Rust documentation for
expand
for more information. -
floor(
int position) → void -
See the Rust documentation for
floor
for 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_mode
for more information. -
roundWithModeAndIncrement(
int position, DecimalSignedRoundingMode mode, DecimalRoundingIncrement increment) → void -
See the Rust documentation for
round_with_mode_and_increment
for 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_end
for more information. -
trimEndIfInteger(
) → void -
See the Rust documentation for
trim_end_if_integer
for more information. -
trimStart(
) → void -
See the Rust documentation for
trim_start
for more information. -
trunc(
int position) → void -
See the Rust documentation for
trunc
for more information.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited