U - Unit; the unit of this DoubleScalarpublic abstract class DoubleScalar<U extends Unit<U>> extends Scalar<U> implements DoubleMathFunctions<DoubleScalar<U>>
This file was generated by the djunits value classes generator, 26 jun, 2015
Copyright (c) 2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2015-10-07 01:17:57 +0200 (Wed, 07 Oct 2015) $, @version $Revision: 88 $, by $Author: averbraeck $, initial
version 26 jun, 2015
| Modifier and Type | Class and Description |
|---|---|
static class |
DoubleScalar.Abs<U extends Unit<U>> |
static class |
DoubleScalar.Rel<U extends Unit<U>> |
| Modifier | Constructor and Description |
|---|---|
protected |
DoubleScalar(U unit)
Construct a new Immutable DoubleScalar.
|
| Modifier and Type | Method and Description |
|---|---|
static DoubleScalar.Abs<SIUnit> |
divide(DoubleScalar.Abs<?> left,
DoubleScalar.Abs<?> right)
Divide two values; the result is a new instance with a different (existing or generated) SI unit.
|
static DoubleScalar.Rel<SIUnit> |
divide(DoubleScalar.Rel<?> left,
DoubleScalar.Rel<?> right)
Divide two values; the result is a new instance with a different (existing or generated) SI unit.
|
double |
doubleValue() |
boolean |
equals(Object obj) |
float |
floatValue() |
double |
getInUnit()
Retrieve the value in the original unit.
|
double |
getInUnit(U targetUnit)
Retrieve the value converted into some specified unit.
|
abstract double |
getSI()
Retrieve the value in the underlying SI unit.
|
int |
hashCode() |
static <U extends Unit<U>> |
interpolate(DoubleScalar.Abs<U> zero,
DoubleScalar.Abs<U> one,
double ratio)
Interpolate between or extrapolate over two values.
|
static <U extends Unit<U>> |
interpolate(DoubleScalar.Rel<U> zero,
DoubleScalar.Rel<U> one,
double ratio)
Interpolate between or extrapolate over two values.
|
int |
intValue() |
long |
longValue() |
static <U extends Unit<U>> |
minus(DoubleScalar.Abs<U> left,
DoubleScalar.Abs<U> right)
Subtract two absolute values.
|
static <U extends Unit<U>> |
minus(DoubleScalar.Abs<U> left,
DoubleScalar.Rel<U> right)
Subtract a Relative value from an absolute value.
|
static <U extends Unit<U>> |
minus(DoubleScalar.Rel<U> left,
DoubleScalar.Rel<U> right)
Subtract a relative value from a relative value.
|
static DoubleScalar.Abs<SIUnit> |
multiply(DoubleScalar.Abs<?> left,
DoubleScalar.Abs<?> right)
Multiply two values; the result is a new instance with a different (existing or generated) SI unit.
|
static DoubleScalar.Rel<SIUnit> |
multiply(DoubleScalar.Rel<?> left,
DoubleScalar.Rel<?> right)
Multiply two values; the result is a new instance with a different (existing or generated) SI unit.
|
static <U extends Unit<U>> |
plus(DoubleScalar.Abs<U> left,
DoubleScalar.Rel<U> right)
Add a Relative value to an Absolute value.
|
static <U extends Unit<U>> |
plus(DoubleScalar.Rel<U> left,
DoubleScalar.Abs<U> right)
Add an Absolute value to a Relative value.
|
static <U extends Unit<U>> |
plus(DoubleScalar.Rel<U> left,
DoubleScalar.Rel<U> right)
Add a Relative value to a Relative value.
|
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, isRelativebyteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitdivideBy, multiplyByprotected DoubleScalar(U unit)
unit - U; the unit of the new DoubleScalarpublic abstract double getSI()
public final double getInUnit()
public final double getInUnit(U targetUnit)
targetUnit - U; the unit to convert the value intopublic final float floatValue()
floatValue in class Numberpublic final double doubleValue()
doubleValue in class Numberpublic 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 unitpublic static <U extends Unit<U>> DoubleScalar.Abs<U> plus(DoubleScalar.Abs<U> left, DoubleScalar.Rel<U> right)
U - Unit; the unit of the parameters and the resultleft - DoubleScalar.Abs<U>; the left argumentright - DoubleScalar.Rel<U>; the right argumentpublic static <U extends Unit<U>> DoubleScalar.Abs<U> plus(DoubleScalar.Rel<U> left, DoubleScalar.Abs<U> right)
U - Unit; the unit of the parameters and the resultleft - DoubleScalar.Abs<U>; the left argumentright - DoubleScalar.Rel<U>; the right argumentpublic static <U extends Unit<U>> DoubleScalar.Rel<U> plus(DoubleScalar.Rel<U> left, DoubleScalar.Rel<U> right)
U - Unit; the unit of the parameters and the resultleft - DoubleScalar.Rel<U>; the left argumentright - DoubleScalar.Rel<U>; the right argumentpublic static <U extends Unit<U>> DoubleScalar.Abs<U> minus(DoubleScalar.Abs<U> left, DoubleScalar.Rel<U> right)
U - Unit; the unit of the parameters and the resultleft - DoubleScalar.Abs<U>; the left valueright - DoubleScalar.Rel<U>; the right valuepublic static <U extends Unit<U>> DoubleScalar.Rel<U> minus(DoubleScalar.Rel<U> left, DoubleScalar.Rel<U> right)
U - Unit; the unit of the parameters and the resultleft - DoubleScalar.Rel<U>; the left valueright - DoubleScalar.Rel<U>; the right valuepublic static <U extends Unit<U>> DoubleScalar.Rel<U> minus(DoubleScalar.Abs<U> left, DoubleScalar.Abs<U> right)
U - Unit; the unit of the parameters and the resultleft - DoubleScalar.Abs<U>; value 1right - DoubleScalar.Abs<U>; value 2public static DoubleScalar.Abs<SIUnit> multiply(DoubleScalar.Abs<?> left, DoubleScalar.Abs<?> right)
left - DoubleScalar.Abs<?>; the left operandright - DoubleScalar.Abs<?>; the right operandpublic static DoubleScalar.Rel<SIUnit> multiply(DoubleScalar.Rel<?> left, DoubleScalar.Rel<?> right)
left - DoubleScalar.Rel<?>; the left operandright - DoubleScalar.Rel<?>; the right operandpublic static DoubleScalar.Abs<SIUnit> divide(DoubleScalar.Abs<?> left, DoubleScalar.Abs<?> right)
left - DoubleScalar.Abs<?>; the left operandright - DoubleScalar.Abs<?>; the right operandpublic static DoubleScalar.Rel<SIUnit> divide(DoubleScalar.Rel<?> left, DoubleScalar.Rel<?> right)
left - DoubleScalar.Rel<?>; the left operandright - DoubleScalar.Rel<?>; the right operandpublic static <U extends Unit<U>> DoubleScalar.Abs<U> interpolate(DoubleScalar.Abs<U> zero, DoubleScalar.Abs<U> one, double ratio)
U - Unit; the unit of the parameters and the resultzero - DoubleScalar.Abs<U>; zero reference (returned when ratio == 0)one - DoubleScalar.Abs<U>; one reference (returned when ratio == 1)ratio - double; the ratio that determines where between (or outside) zero and one the result liespublic static <U extends Unit<U>> DoubleScalar.Rel<U> interpolate(DoubleScalar.Rel<U> zero, DoubleScalar.Rel<U> one, double ratio)
U - Unit; the unit of the parameters and the resultzero - DoubleScalar.Rel<U>; zero reference (returned when ratio == 0)one - DoubleScalar.Rel<U>; one reference (returned when ratio == 1)ratio - double; the ratio that determines where between (or outside) zero and one the result liesCopyright © 2015 Delft University of Technology. All rights reserved.