etomica.units
Class UnitRatio
java.lang.Object
etomica.units.CompoundUnit
etomica.units.UnitRatio
- All Implemented Interfaces:
- Unit, Serializable
public class UnitRatio
- extends CompoundUnit
Class for constructing units forms as ratios of other units. Examples include
"Joules per mole", "gram per liter", and so on. Conversion factor and labels
are determined from the values given by the constituent units.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnitRatio
public UnitRatio(Unit numerator,
Unit denominator)
- Constructs the compound unit using conversion factors and labels from the
constituent units. These factors/labels are computed once during
construction, and are not updated if the units are modified by changing
their prefix value.
- Parameters:
numerator - the unit in the numerator of the compound unitdenominator - the unit in the denominator of the compount unit
UnitRatio
public UnitRatio(Unit numerator,
Unit denominator,
String name,
String symbol)
- Parameters:
numerator - the unit in the numerator of the compound unitdenominator - the unit in the denominator of the compount unitname - a description of the unit (e.g., Joules per mole)symbol - an abbreviated description of the unit (e.g., J/mol)