Package org.djunits.unit
Class UnitTest.PerMass
- All Implemented Interfaces:
Serializable,Comparable<UnitTest.PerMass>,Additive<UnitTest.PerMass>,Scalable<UnitTest.PerMass>,Value<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). -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionPerMass(double siValue, UnitTest.PerMass.Unit displayUnit) Construct a PerMass quantity with an SI value and a display unit. -
Method Summary
Modifier and TypeMethodDescriptioninstantiateSi(double si, UnitInterface<UnitTest.PerMass> displayUnit) (package private) static UnitTest.PerMassofSi(double si) Create a PerMass quantity from an SI (BASE) value, i.e. in 1/kg.Methods inherited from class org.djunits.quantity.def.Quantity
abs, add, as, compareTo, divide, doubleValue, eq, eq0, equals, floatValue, format, format, format, ge, ge0, getDisplayUnit, getInUnit, getInUnit, getName, gt, gt0, hashCode, instantiate, instantiateSi, interpolate, intValue, isRelative, le, le0, longValue, lt, lt0, max, mean, min, multiply, ne, ne0, negate, of, product, reciprocal, scaleBy, si, siUnit, subtract, sum, toString, 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
-
Constructor Details
-
PerMass
PerMass(double siValue, UnitTest.PerMass.Unit displayUnit) Construct a PerMass quantity with an SI value and a display unit.- Parameters:
siValue- double; the numeric SI valuedisplayUnit- the display unit
-
-
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
-
instantiateSi
- Specified by:
instantiateSiin classQuantity<UnitTest.PerMass>
-