Class Quantity
- All Implemented Interfaces:
Comparable<Quantity>, Field<Scalar<Quantity>>, Group, Group.Additive<Scalar<Quantity>>, Group.Multiplicative<Scalar<Quantity>>, NormedVectorSpace<Scalar<Quantity>, Quantity>, Operation, Operation.Addition<Scalar<Quantity>>, Operation.Division<Scalar<Quantity>>, Operation.Multiplication<Scalar<Quantity>>, Operation.Subtraction<Scalar<Quantity>>, Ring<Scalar<Quantity>>, ScalarOperation, ScalarOperation.Addition<Scalar<Quantity>, Quantity>, ScalarOperation.Division<Scalar<Quantity>, Quantity>, ScalarOperation.Multiplication<Scalar<Quantity>, Quantity>, ScalarOperation.Subtraction<Scalar<Quantity>, Quantity>, VectorSpace<Scalar<Quantity>, Quantity>, Scalar<Quantity>, SelfDeclaringScalar<Quantity>, AccessScalar<Quantity>, Tensor<Quantity, Scalar<Quantity>>, NumberContext.Enforceable<Quantity>, NumberDefinition
quantity as in "amount = price * quatity"
-
Nested Class Summary
Nested classes/interfaces inherited from class ExactDecimal
ExactDecimal.Descriptor, ExactDecimal.Factory<S>Nested classes/interfaces inherited from interface Group
Group.Additive<T>, Group.Multiplicative<T>Nested classes/interfaces inherited from interface Operation
Operation.Addition<T>, Operation.Division<T>, Operation.Multiplication<T>, Operation.Subtraction<T>Nested classes/interfaces inherited from interface ScalarOperation
ScalarOperation.Addition<T,N>, ScalarOperation.Division<T, N>, ScalarOperation.Multiplication<T, N>, ScalarOperation.Subtraction<T, N> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ExactDecimal.Descriptorprivate static final doublestatic final Scalar.Factory<Quantity> private static final longstatic final Quantitystatic final Quantitystatic final Quantitystatic final Quantity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ExactDecimal.Descriptorstatic QuantityvalueOf(double value) static QuantityvalueOf(Comparable<?> number) protected Quantitywrap(long numerator) Methods inherited from class ExactDecimal
add, add, compareTo, conjugate, divide, divide, doubleValue, enforce, extractUnscaledValue, floatValue, get, intValue, invert, isAbsolute, isSmall, isZero, longValue, multiply, multiply, negate, norm, numerator, power, signum, subtract, subtract, toBigDecimal, toString, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface NumberDefinition
booleanValue, byteValue, shortValueMethods inherited from interface Scalar
add, dimensions, divide, multiply, rank, subtract, toPlainStringMethods inherited from interface SelfDeclaringScalar
add, divide, multiply, subtractMethods inherited from interface Tensor
components, isSameShape
-
Field Details
-
DESCRIPTOR
-
FACTORY
-
DOUBLE_DENOMINATOR
private static final double DOUBLE_DENOMINATOR- See Also:
-
LONG_DENOMINATOR
private static final long LONG_DENOMINATOR- See Also:
-
NEG
-
ONE
-
TWO
-
ZERO
-
-
Constructor Details
-
Quantity
public Quantity() -
Quantity
Quantity(long numerator)
-
-
Method Details
-
valueOf
-
valueOf
-
multiply
-
descriptor
- Specified by:
descriptorin classExactDecimal<Quantity>
-
wrap
- Specified by:
wrapin classExactDecimal<Quantity>
-