com.thinkaurelius.titan.graphdb.database.serialize.attribute

## Class AbstractDecimal

- java.lang.Object
- - java.lang.Number
  - - com.thinkaurelius.titan.graphdb.database.serialize.attribute.AbstractDecimal

- All Implemented Interfaces:
    Serializable, Comparable<AbstractDecimal>
  Direct Known Subclasses:
    Decimal, Precision

      public abstract class AbstractDecimal
      extends Number
      implements Comparable<AbstractDecimal>

  Author:
    Matthias Broecheler (me@matthiasb.com)
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AbstractDecimal.AbstractDecimalSerializer<V extends AbstractDecimal>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static double` | `EPSILON`
    `static int` | `MAX_DECIMALS`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractDecimal()`
    `` | `AbstractDecimal(double value, int decimals)`
    `protected` | `AbstractDecimal(long format, int decimals)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(AbstractDecimal o)`
    `static long` | `convert(double value, int decimals)`
    `static double` | `convert(long format, int decimals)`
    `double` | `doubleValue()`
    `boolean` | `equals(Object other)`
    `float` | `floatValue()`
    `double` | `getDecimalsOnly()`
    `int` | `hashCode()`
    `int` | `intValue()`
    `long` | `longValue()`
    `static double` | `maxDoubleValue(int decimals)`
    `static double` | `minDoubleValue(int decimals)`
    `String` | `toString()`
    `static boolean` | `withinRange(double value, int decimals)`

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

      `byteValue, shortValue`

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

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

- - ### Field Detail

    - #### MAX_DECIMALS

          public static final int MAX_DECIMALS

      See Also:
        Constant Field Values

    - #### EPSILON

          public static final double EPSILON

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AbstractDecimal

          protected AbstractDecimal()

    - #### AbstractDecimal

          public AbstractDecimal(double value,
                         int decimals)

    - #### AbstractDecimal

          protected AbstractDecimal(long format,
                         int decimals)

  - ### Method Detail

    - #### minDoubleValue

          public static double minDoubleValue(int decimals)

    - #### maxDoubleValue

          public static double maxDoubleValue(int decimals)

    - #### withinRange

          public static final boolean withinRange(double value,
                            int decimals)

    - #### convert

          public static final long convert(double value,
                     int decimals)

    - #### convert

          public static final double convert(long format,
                       int decimals)

    - #### intValue

          public int intValue()

      Specified by:
        `intValue` in class `Number`

    - #### longValue

          public long longValue()

      Specified by:
        `longValue` in class `Number`

    - #### floatValue

          public float floatValue()

      Specified by:
        `floatValue` in class `Number`

    - #### doubleValue

          public double doubleValue()

      Specified by:
        `doubleValue` in class `Number`

    - #### getDecimalsOnly

          public double getDecimalsOnly()

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### compareTo

          public int compareTo(AbstractDecimal o)

      Specified by:
        `compareTo` in interface `Comparable<AbstractDecimal>`

Copyright © 2012–2014. All rights reserved.