Class OfficeCurrency

java.lang.Object
com.github.miachm.sods.OfficeCurrency

public class OfficeCurrency extends Object
This class represents a Currency in a Spreadsheet It contains the current currency object (java.util.Currency) and the numeric value
  • Constructor Details

    • OfficeCurrency

      public OfficeCurrency(Currency currency, Double value)
      It builds an inmutable class of the OfficeCurrency
      Parameters:
      currency - The currency instance class, it specify which currency is. It can be null
      value - The numeric value. It can be null.
    • OfficeCurrency

      public OfficeCurrency(Currency currency, Double value, NumberFormat format)
      It builds an inmutable class of the OfficeCurrency
      Parameters:
      currency - The currency instance class, it specify which currency is. It can be null
      value - The numeric value. It can be null.
      format - How the currency value should be formatted in a string
  • Method Details

    • getCurrency

      public Currency getCurrency()
    • getValue

      public Double getValue()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      It prints the money quantity in a standard form (value + currency name) For example: 5EUR 10USD
      Overrides:
      toString in class Object