com.jacob.com

## Class Currency

- java.lang.Object
- - com.jacob.com.Currency

-     public class Currency
      extends java.lang.Object

  Most COM bridges use java.lang.Long as their Java data type for COM Currency data. This is because COM currency is a 64 bit number where the last 4 digits represent the milli-cents. We wanted to support 64 bit Long values for x64 platforms so that meant we wanted to map Java.LONG to COM.LONG even though it only works for 64 bit platforms. The end result was we needed a new representation for Money so we have this.

  In the future, this should convert to and from BigDecimal or Double

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Currency(long newValue)` constructor that takes a long already in COM representation
    `Currency(java.lang.String newValue)` constructor that takes a String already in COM representation

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(Currency anotherCurrency)` compares the values of two currencies
    `int` | `compareTo(java.lang.Object o)` standard comparison
    `boolean` | `equals(java.lang.Object o)`
    `protected java.lang.Long` | `getLongValue()` getter to the inner storage so that cmpareTo can work
    `long` | `longValue()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Currency

          public Currency(long newValue)

      constructor that takes a long already in COM representation
      Parameters:
        `newValue` -

    - #### Currency

          public Currency(java.lang.String newValue)

      constructor that takes a String already in COM representation
      Parameters:
        `newValue` -

  - ### Method Detail

    - #### longValue

          public long longValue()

      Returns:
        the currency as a primitive long

    - #### getLongValue

          protected java.lang.Long getLongValue()

      getter to the inner storage so that cmpareTo can work
      Returns:
        the embedded long value

    - #### compareTo

          public int compareTo(Currency anotherCurrency)

      compares the values of two currencies
      Parameters:
        `anotherCurrency` -
      Returns:
        the usual compareTo results

    - #### compareTo

          public int compareTo(java.lang.Object o)

      standard comparison
      Parameters:
        `o` - must be Currency or Long
      Returns:
        the usual compareTo results

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

http://jacob-project.sourceforge.net