com.rubecula.jquantity
Class UnitsImperial
java.lang.Object
java.util.AbstractMap
java.util.HashMap
com.rubecula.jquantity.UnitsTable
com.rubecula.jquantity.UnitsImperial
- All Implemented Interfaces:
- Cloneable, com.rubecula.util.Identifiable, Map, Serializable
- public class UnitsImperial
- extends UnitsTable
Class UnitsImperial models all of the Imperial ("English") units as a
.
- Since:
- V_0_4
- Version:
- $Revision: 1.9 $
- Author:
- Robin Hillyard
- See Also:
- Serialized Form
Nested classes inherited from class java.util.HashMap |
|
Nested classes inherited from class java.util.AbstractMap |
|
Fields inherited from class com.rubecula.jquantity.UnitsTable |
|
Fields inherited from class java.util.HashMap |
|
Constructor Summary |
UnitsImperial()
Construct a new table of CGS units.
|
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
$_BTU_VAL
private static final String $_BTU_VAL
- See Also:
- Constant Field Values
$S_BTU
private static final String $S_BTU
- See Also:
- Constant Field Values
UnitsImperial
public UnitsImperial()
- Construct a new table of CGS units.
Initially, the following units are defined:
New units may be added at any time.
put
Measurable put(Measurable unit)
- Description copied from class:
UnitsTable
- Method to insert a unit in this table. Successful insertion depends on
the value of the unit's identifier. If it's not null, then an insertion
will be made provided that there is no existing entry of the same name
(else an exception will be thrown). If it's null, then no insertion will
be ever be made. However, if the unit itself matches an existing unit in
the table, then that (matching unit) will be returned. Otherwise, the
given unit will be returned.
- Overrides:
put
in class UnitsTable
- Parameters:
unit
- the Measurable instance to be inserted.