Abstract class representing a coin, implementing the Currency interface.

Hierarchy (view full)

Implements

Constructors

Accessors

Methods

Constructors

Accessors

  • get code(): Txt
  • Return the code as a Txt object.

    Returns Txt

    The code object

    Since currency codes likely use Unicode composite symbols, Txt type enforce the representation of the code is normalized.

Methods

  • Compares this Currency object with another Currency object for order.

    Parameters

    • that: Currency

      The Currency object to be compared.

    Returns number

    A negative integer, zero, or a positive integer as this Currency is less than, equal to, or greater than the specified Currency.

    If the currency codes do not match.

  • Determines if this Currency object is equal to another Currency object.

    Parameters

    • that: Currency

      The Currency object to compare with the current instance.

    Returns boolean

    • true if the objects are considered equal, otherwise false.