com.rubecula.jquantity
Class UnitsSI
java.lang.Object
java.util.AbstractMap
java.util.HashMap
com.rubecula.jquantity.UnitsTable
com.rubecula.jquantity.UnitsSI
- All Implemented Interfaces:
- Cloneable, com.rubecula.util.Identifiable, Map, Serializable
- Direct Known Subclasses:
- UnitsAll
- public class UnitsSI
- extends UnitsTable
Class UnitsSI models all of the SI units as a .
- Since:
- V_0_4
- Version:
- $Revision: 1.7 $
- 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 |
UnitsSI()
Construct a new table of SI units.
|
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
UnitsSI
public UnitsSI()
- Construct a new table of SI 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.