U
- the unitT
- the typepublic abstract class AbstractDoubleScalar<U extends Unit<U>,T extends AbstractDoubleScalar<U,T>> extends Scalar<U> implements DoubleScalarInterface, Comparable<T>
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
Modifier and Type | Field and Description |
---|---|
double |
si
The value, stored in the standard SI unit.
|
Constructor and Description |
---|
AbstractDoubleScalar(U unit,
double si) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(T o) |
double |
doubleValue() |
boolean |
eq(T o)
Test if this DoubleScalar is equal to a DoubleScalar.
|
boolean |
eq0()
Test if this DoubleScalar is equal to 0.0.
|
boolean |
equals(Object obj) |
float |
floatValue() |
boolean |
ge(T o)
Test if this DoubleScalar is greater than a DoubleScalar.
|
boolean |
ge0()
Test if this DoubleScalar is greater than 0.0.
|
double |
getInUnit()
Retrieve the value in the original unit.
|
double |
getInUnit(U targetUnit)
Retrieve the value converted into some specified unit.
|
double |
getSI()
Retrieve the value in the underlying SI unit.
|
boolean |
gt(T o)
Test if this DoubleScalar is greater than or equal to a DoubleScalar.
|
boolean |
gt0()
Test if this DoubleScalar is greater than or equal to 0.0.
|
int |
hashCode() |
int |
intValue() |
boolean |
le(T o)
Test if this DoubleScalar is less than or equal to a DoubleScalar.
|
boolean |
le0()
Test if this DoubleScalar is less than or equal to 0.0.
|
long |
longValue() |
boolean |
lt(T o)
Test if this DoubleScalar is less than a DoubleScalar.
|
boolean |
lt0()
Test if this DoubleScalar is less than 0.0.
|
boolean |
ne(T o)
Test if this DoubleScalar is not equal to a DoubleScalar.
|
boolean |
ne0()
Test if this DoubleScalar is not equal to 0.0.
|
String |
toString() |
String |
toString(boolean verbose,
boolean withUnit)
Print this DoubleScalar with optional type and unit information.
|
String |
toString(U displayUnit)
Print this DoubleScalar with the value expressed in the specified unit.
|
String |
toString(U displayUnit,
boolean verbose,
boolean withUnit)
Print this DoubleScalar with the value expressed in the specified unit.
|
expressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnit
byteValue, shortValue
AbstractDoubleScalar(U unit, double si)
unit
- the unitsi
- the si value to storepublic final double getSI()
getSI
in interface DoubleScalarInterface
public final boolean lt(T o)
o
- T, a relative typed DoubleScalar; the right hand side operand of the comparisonpublic final boolean le(T o)
o
- T, a relative typed DoubleScalar; the right hand side operand of the comparisonpublic final boolean gt(T o)
o
- T, a relative typed DoubleScalar; the right hand side operand of the comparisonpublic final boolean ge(T o)
o
- T, a relative typed DoubleScalar; the right hand side operand of the comparisonpublic final boolean eq(T o)
o
- T, a relative typed DoubleScalar; the right hand side operand of the comparisonpublic final boolean ne(T o)
o
- T, a relative typed DoubleScalar; the right hand side operand of the comparisonpublic final boolean lt0()
public final boolean le0()
public final boolean gt0()
public final boolean ge0()
public final boolean eq0()
public final boolean ne0()
public final int compareTo(T o)
compareTo
in interface Comparable<T extends AbstractDoubleScalar<U,T>>
public final double getInUnit()
getInUnit
in interface DoubleScalarInterface
public final double getInUnit(U targetUnit)
targetUnit
- U; the unit to convert the value intopublic final float floatValue()
floatValue
in class Number
public final double doubleValue()
doubleValue
in class Number
public final String toString(U displayUnit)
displayUnit
- U; the unit into which the value is converted for displaypublic final String toString(boolean verbose, boolean withUnit)
verbose
- boolean; if true; include type info; if false; exclude type infowithUnit
- boolean; if true; include the unit; of false; exclude the unitpublic final String toString(U displayUnit, boolean verbose, boolean withUnit)
displayUnit
- U; the unit into which the value is converted for displayverbose
- boolean; if true; include type info; if false; exclude type infowithUnit
- boolean; if true; include the unit; of false; exclude the unitCopyright © 2015–2018 Delft University of Technology. All rights reserved.