All Implemented Interfaces:
IConvertable, IPrimitiveValue, ISingleValue, IValue, Serializable, Comparable<Object>
Direct Known Subclasses:
AttributeCurrency

public class Currency extends NumberValue
This class represents a single currency value.
Since:
6.3
Author:
O. Kerpershoek
See Also:
  • Field Details

    • UNKNOWN

      public static final Currency UNKNOWN
      This member defines the UNKNOWN value for the currency type.
  • Constructor Details

    • Currency

      protected Currency()
    • Currency

      public Currency(double doubleValue)
      Constructs the currency value with a double containing the actual value.
      Parameters:
      doubleValue - The actual value of the currency.
    • Currency

      public Currency(Currency other)
      Copy constructor.
      Parameters:
      other - value to copy.
    • Currency

      public Currency(IMultilingualText displayValue, double doubleValue)
      Constructs the Currency with a display text.
      Parameters:
      displayValue - Text object containing the display value that should be used.
      doubleValue - a double containing the actual value.
    • Currency

      public Currency(String typeName, IMultilingualText displayValue, double doubleValue)
      Constructs the Currency as a domain value.
      Parameters:
      typeName - The name of the domain the value belongs to.
      displayValue - Text object containing the display value that should be used.
      doubleValue - a double containing the actual value.
  • Method Details

    • valueOf

      public static NumberValue valueOf(Object obj)
    • parseCurrency

      public static double parseCurrency(Object obj)
    • forType

      public IPrimitiveValue forType(String typeName, IMultilingualText displayValue)
      Description copied from interface: IPrimitiveValue
      This method adds the type and display information to the value, and returns the value with this added information. The method will not change the state of the value the method is invoked on, but it will return a copy of the current value with the added information.
      Specified by:
      forType in interface IPrimitiveValue
      Overrides:
      forType in class NumberValue
      Parameters:
      typeName - The type of the value.
      displayValue - Multilingual text containing display values.
      Returns:
      The value with the added information.
    • getDataType

      public DataType getDataType()
      Description copied from interface: IValue
      This method returns the data type of the value.
      Specified by:
      getDataType in interface IValue
      Overrides:
      getDataType in class NumberValue
      Returns:
      The data type of the value.
    • toString

      public String toString()
      Overrides:
      toString in class NumberValue