Class DQuantity
java.lang.Object
java.lang.Number
gnu.math.Numeric
gnu.math.Quantity
gnu.math.DQuantity
- All Implemented Interfaces:
Externalizable, Serializable
A Quantity represented as the product of a plain double and a Unit.
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DQuantityReturn this + k * obj.addReversed(Numeric x, int k) Calculatex+k&this.static DQuantityfinal doubleThe value of the real component, as a double.booleanisExact()booleanisZero()final Complexnumber()final RealNumre()The value of the real component, as a RealNum.voidstatic DQuantityfinal Unitunit()voidMethods inherited from class Quantity
abs, add, compare, compare, compareReversed, dimensions, divide, doubleImagValue, doubleJmagValue, doubleKmagValue, im, imValue, jm, jmValue, km, kmValue, make, make, make, neg, reValue, times, toStringMethods inherited from class Numeric
add, asNumericOrNull, div_inv, equals, floatValue, geq, grt, intValue, longValue, mul_ident, power, sub, toExact, toInexact, toStringMethods inherited from class Number
byteValue, shortValue
-
Constructor Details
-
DQuantity
-
-
Method Details
-
unit
-
number
-
re
-
doubleValue
public final double doubleValue()Description copied from class:QuantityThe value of the real component, as a double. This is relative to the unit().dims - i.e. unit()/doubleValue() is factored in.- Overrides:
doubleValuein classQuantity
-
isExact
-
isZero
-
add
-
times
-
divide
-
add
-
addReversed
-
mul
-
mulReversed
- Overrides:
mulReversedin classQuantity
-
div
-
divReversed
- Overrides:
divReversedin classQuantity
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-