Package org.djunits.unit
Class UnitTest.PerMass
java.lang.Object
java.lang.Number
org.djunits.quantity.def.Quantity<UnitTest.PerMass,UnitTest.PerMass.Unit>
org.djunits.unit.UnitTest.PerMass
- All Implemented Interfaces:
Serializable,Comparable<UnitTest.PerMass>,Additive<UnitTest.PerMass>,Scalable<UnitTest.PerMass>,Value<UnitTest.PerMass.Unit,UnitTest.PerMass>
- Enclosing class:
- UnitTest
A minimal test-local quantity representing a "per mass" value (unit: 1/kg), used to verify correct behavior of
per-kilo SI-prefix generation on
AbstractUnit.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classUnit forUnitTest.PerMass(SI dimension: 1/kg). -
Constructor Summary
ConstructorsConstructorDescriptionPerMass(double value, UnitTest.PerMass.Unit unit) Construct a PerMass quantity with a value in the provided unit. -
Method Summary
Modifier and TypeMethodDescriptioninstantiate(double si) (package private) static UnitTest.PerMassofSi(double si) Create a PerMass quantity from an SI (BASE) value, i.e. in 1/kg.siUnit()Methods inherited from class org.djunits.quantity.def.Quantity
abs, add, as, compareTo, divide, doubleValue, eq, eq0, equals, floatValue, format, format, ge, ge0, getDisplayUnit, getInUnit, getInUnit, getName, gt, gt0, hashCode, instantiate, interpolate, intValue, isRelative, le, le0, longValue, lt, lt0, max, mean, min, multiply, ne, ne0, negate, of, product, reciprocal, scaleBy, setDisplayUnit, si, subtract, sum, toDisplayString, toDisplayString, toString, toString, toString, toString, toStringSIPrefixed, toStringSIPrefixed, toTextualString, toTextualString, valueOfMethods inherited from class java.lang.Number
byteValue, shortValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.djunits.value.Value
isAbsolute, setDisplayUnit
-
Constructor Details
-
PerMass
PerMass(double value, UnitTest.PerMass.Unit unit) Construct a PerMass quantity with a value in the provided unit.- Parameters:
value- double; the numeric valueunit- Unit; the unit in whichvalueis expressed
-
-
Method Details
-
ofSi
Create a PerMass quantity from an SI (BASE) value, i.e. in 1/kg.- Parameters:
si- double; the SI (BASE) value- Returns:
- PerMass; new instance with SI value
-
instantiate
- Specified by:
instantiatein classQuantity<UnitTest.PerMass,UnitTest.PerMass.Unit>
-
siUnit
- Overrides:
siUnitin classQuantity<UnitTest.PerMass,UnitTest.PerMass.Unit>
-