# DataType.ARXDecimal (ARX API Documentation)

org.deidentifier.arx

## Class DataType.ARXDecimal

- java.lang.Object
- - org.deidentifier.arx.DataType<java.lang.Double>
  - - org.deidentifier.arx.DataType.ARXDecimal

- All Implemented Interfaces:
    java.io.Serializable, java.util.Comparator<java.lang.Double>, DataType.DataTypeWithFormat, DataType.DataTypeWithRatioScale<java.lang.Double>
  Enclosing class:
    DataType<T>

      public static class DataType.ARXDecimal
      extends DataType<java.lang.Double>
      implements DataType.DataTypeWithFormat, DataType.DataTypeWithRatioScale<java.lang.Double>

  Base class for numeric types.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.deidentifier.arx.DataType

      `DataType.ARXDate, DataType.ARXDecimal, DataType.ARXInteger, DataType.ARXOrderedString, DataType.ARXString, DataType.DataTypeDescription<T>, DataType.DataTypeWithFormat, DataType.DataTypeWithRatioScale<T>`

  - ### Field Summary

    - ### Fields inherited from class org.deidentifier.arx.DataType

      `ANY_VALUE, DATE, DECIMAL, INTEGER, NULL_VALUE, ORDERED_STRING, STRING`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Double` | `add(java.lang.Double augend, java.lang.Double addend)`
    `DataType<java.lang.Double>` | `clone()`
    `int` | `compare(java.lang.Double t1, java.lang.Double t2)` Compare.
    `int` | `compare(java.lang.String s1, java.lang.String s2)` Compares two values.
    `java.lang.Double` | `divide(java.lang.Double dividend, java.lang.Double divisor)`
    `java.lang.String` | `divide(java.lang.String dividend, java.lang.String divisor)`
    `boolean` | `equals(java.lang.Object obj)`
    `java.lang.String` | `format(java.lang.Double s)` Converts a value into a string.
    `java.lang.Double` | `fromDouble(java.lang.Double d)` Converts a double into a value.
    `DataType.DataTypeDescription<java.lang.Double>` | `getDescription()` Returns a description of the data type.
    `java.lang.String` | `getFormat()`
    `java.util.Locale` | `getLocale()` Returns the locale of the format.
    `java.lang.Double` | `getMaximum()`
    `java.lang.Double` | `getMinimum()`
    `int` | `hashCode()`
    `boolean` | `isValid(java.lang.String s)` Checks whether the given string conforms to the data type's format.
    `java.lang.Double` | `multiply(java.lang.Double multiplicand, double multiplicator)`
    `java.lang.Double` | `multiply(java.lang.Double multiplicand, java.lang.Double multiplicator)`
    `java.lang.Double` | `multiply(java.lang.Double multiplicand, int multiplicator)`
    `java.lang.String` | `multiply(java.lang.String multiplicand, java.lang.String multiplicator)`
    `java.lang.Double` | `parse(java.lang.String s)` Converts a string into a value.
    `double` | `ratio(java.lang.Double dividend, java.lang.Double divisor)`
    `java.lang.Double` | `subtract(java.lang.Double minuend, java.lang.Double subtrahend)`
    `java.lang.Double` | `toDouble(java.lang.Double val)` Converts a double into a value.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.deidentifier.arx.DataType

      `createAggregate, createDate, createDate, createDecimal, createDecimal, createInteger, createInteger, createOrderedString, createOrderedString, createOrderedString, isAny, isNull, list, list`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### add

          public java.lang.Double add(java.lang.Double augend,
                             java.lang.Double addend)

      Specified by:
        `add` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Returns:

    - #### clone

          public DataType<java.lang.Double> clone()

      Specified by:
        `clone` in class `DataType<java.lang.Double>`

    - #### compare

          public int compare(java.lang.Double t1,
                    java.lang.Double t2)

      Description copied from class: `DataType`
      Compare.
      Specified by:
        `compare` in interface `java.util.Comparator<java.lang.Double>`
      Specified by:
        `compare` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Specified by:
        `compare` in class `DataType<java.lang.Double>`

    - #### compare

          public int compare(java.lang.String s1,
                    java.lang.String s2)
                      throws java.lang.NumberFormatException

      Description copied from class: `DataType`
      Compares two values. The result is 0 if both values are equal, less than 0 if the first value is less than the second argument, and greater than 0 if the first value is greater than the second argument.
      Specified by:
        `compare` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Specified by:
        `compare` in class `DataType<java.lang.Double>`
      Returns:
      Throws:
        `java.lang.NumberFormatException`

    - #### divide

          public java.lang.Double divide(java.lang.Double dividend,
                                java.lang.Double divisor)

      Specified by:
        `divide` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Returns:

    - #### divide

          public java.lang.String divide(java.lang.String dividend,
                                java.lang.String divisor)

      Specified by:
        `divide` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Returns:

    - #### equals

          public boolean equals(java.lang.Object obj)

      Specified by:
        `equals` in interface `java.util.Comparator<java.lang.Double>`
      Specified by:
        `equals` in class `DataType<java.lang.Double>`

    - #### format

          public java.lang.String format(java.lang.Double s)

      Description copied from class: `DataType`
      Converts a value into a string.
      Specified by:
        `format` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Specified by:
        `format` in class `DataType<java.lang.Double>`
      Returns:

    - #### fromDouble

          public java.lang.Double fromDouble(java.lang.Double d)

      Description copied from interface: `DataType.DataTypeWithRatioScale`
      Converts a double into a value.
      Specified by:
        `fromDouble` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Returns:

    - #### getDescription

          public DataType.DataTypeDescription<java.lang.Double> getDescription()

      Description copied from class: `DataType`
      Returns a description of the data type.
      Specified by:
        `getDescription` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Specified by:
        `getDescription` in class `DataType<java.lang.Double>`
      Returns:

    - #### getFormat

          public java.lang.String getFormat()

      Specified by:
        `getFormat` in interface `DataType.DataTypeWithFormat`
      Returns:

    - #### getLocale

          public java.util.Locale getLocale()

      Returns the locale of the format.
      Specified by:
        `getLocale` in interface `DataType.DataTypeWithFormat`
      Returns:

    - #### getMaximum

          public java.lang.Double getMaximum()

      Specified by:
        `getMaximum` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Returns:

    - #### getMinimum

          public java.lang.Double getMinimum()

      Specified by:
        `getMinimum` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Returns:

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in class `DataType<java.lang.Double>`

    - #### isValid

          public boolean isValid(java.lang.String s)

      Description copied from class: `DataType`
      Checks whether the given string conforms to the data type's format.
      Specified by:
        `isValid` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Specified by:
        `isValid` in class `DataType<java.lang.Double>`
      Returns:

    - #### multiply

          public java.lang.Double multiply(java.lang.Double multiplicand,
                                  double multiplicator)

      Specified by:
        `multiply` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Returns:

    - #### multiply

          public java.lang.Double multiply(java.lang.Double multiplicand,
                                  java.lang.Double multiplicator)

      Specified by:
        `multiply` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Returns:

    - #### multiply

          public java.lang.Double multiply(java.lang.Double multiplicand,
                                  int multiplicator)

      Specified by:
        `multiply` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Returns:

    - #### multiply

          public java.lang.String multiply(java.lang.String multiplicand,
                                  java.lang.String multiplicator)

      Specified by:
        `multiply` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Returns:

    - #### parse

          public java.lang.Double parse(java.lang.String s)

      Description copied from class: `DataType`
      Converts a string into a value.
      Specified by:
        `parse` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Specified by:
        `parse` in class `DataType<java.lang.Double>`
      Returns:

    - #### ratio

          public double ratio(java.lang.Double dividend,
                     java.lang.Double divisor)

      Specified by:
        `ratio` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Returns:

    - #### subtract

          public java.lang.Double subtract(java.lang.Double minuend,
                                  java.lang.Double subtrahend)

      Specified by:
        `subtract` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Returns:

    - #### toDouble

          public java.lang.Double toDouble(java.lang.Double val)

      Description copied from interface: `DataType.DataTypeWithRatioScale`
      Converts a double into a value.
      Specified by:
        `toDouble` in interface `DataType.DataTypeWithRatioScale<java.lang.Double>`
      Returns:

    - #### toString

          public java.lang.String toString()

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