com.rubecula.units
Class UnitsSI

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended bycom.rubecula.util.StringMap
              extended bycom.rubecula.units.UnitsTable
                  extended bycom.rubecula.units.UnitsSI
All Implemented Interfaces:
java.lang.Cloneable, Identifiable, java.util.Map, java.io.Serializable
Direct Known Subclasses:
UnitsAll

public class UnitsSI
extends UnitsTable

Class UnitsSI models all of the SI units as a UnitsTable.

Since:
V_0_4
Version:
$Revision: 1.5 $
Author:
Robin Hillyard
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.HashMap
 
Nested classes inherited from class java.util.AbstractMap
 
Field Summary
 
Fields inherited from class com.rubecula.units.UnitsTable
 
Fields inherited from class java.util.HashMap
 
Fields inherited from class java.util.AbstractMap
 
Constructor Summary
UnitsSI()
          Construct a new table of SI units.
 
Method Summary
(package private)  Measurable put(Measurable unit)
          Method to insert a unit in this table.
 
Methods inherited from class com.rubecula.units.UnitsTable
audit, findParallel, findParallel, findParallel, getIdentifier, getName, getSystem, lookup, lookup, match, toString
 
Methods inherited from class com.rubecula.util.StringMap
get, get, put, put
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

UnitsSI

public UnitsSI()
Construct a new table of SI units.

Initially, the following units are defined:

New units may be added at any time.

Method Detail

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.