Compares this Amount with another Amount.
Defines the natural ordering of Amount values. Useful for sorting and ordering logic.
-1 if this < other, 0 if equal, 1 if this > other.
Whether this Amount can be safely converted to a number.
Internal canonical value.
Unsafe conversion to number. Precision can be lost above MAX_SAFE_INTEGER.
Canonical decimal representation for logs/JSON string mode.
StaticfromStaticmaxStaticminStaticoneStaticsumStaticzero
Immutable, non-negative integer amount value object.
Internal representation is bigint. Use factory methods to instantiate.
Example