Package com.arpnetworking.tsdcore.model
Class Quantity
java.lang.Object
com.arpnetworking.tsdcore.model.Quantity
- All Implemented Interfaces:
Serializable
,Comparable<Quantity>
Represents a sample.
- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot com)
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd thisQuantity
to the specified one returning the result.int
Convert thisQuantity
to one in the specified unit.Convert thisQuantity
to one in the specified optional unit.Divide thisQuantity
by the specified one returning the result.boolean
getUnit()
double
getValue()
int
hashCode()
Multiply thisQuantity
with the specified one returning the result.Subtract the specifiedQuantity
from this one returning the result.toString()
unify
(Collection<Quantity> quantities)
-
Method Details
-
getValue
public double getValue() -
getUnit
-
add
-
subtract
-
multiply
Multiply thisQuantity
with the specified one returning the result. -
divide
Divide thisQuantity
by the specified one returning the result. -
convertTo
-
convertTo
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Quantity>
-
hashCode
public int hashCode() -
equals
-
toString
-
unify
-