D
- the (final) type of NumberDistance usedN
- the type of Number used (e.g. Double, Integer, Float, etc.)public abstract class NumberDistance<D extends NumberDistance<D,N>,N extends Number> extends AbstractDistance<D>
DOUBLE_PATTERN, INFINITY_PATTERN, INTEGER_PATTERN
Constructor and Description |
---|
NumberDistance()
Constructs a new NumberDistance object that represents the value argument.
|
Modifier and Type | Method and Description |
---|---|
byte |
byteValue()
Get the value as byte.
|
abstract double |
doubleValue()
Get the value as double.
|
float |
floatValue()
Get the value as float.
|
abstract D |
fromDouble(double val)
Build a new instance from a double value.
|
int |
intValue()
Get the value as int.
|
abstract long |
longValue()
Get the value as long.
|
short |
shortValue()
Get the value as short.
|
equals, getPattern, hashCode, isInfiniteDistance, isNullDistance, isUndefinedDistance, requiredInputPattern, testInputPattern
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
externalizableSize, infiniteDistance, nullDistance, parseString, toString, undefinedDistance
compareTo
readExternal, writeExternal
public NumberDistance()
public abstract D fromDouble(double val)
val
- Valuepublic abstract double doubleValue()
public float floatValue()
public int intValue()
public abstract long longValue()
public short shortValue()
public byte byteValue()