com.rubecula.units
Class UnitsCGS

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.UnitsCGS
All Implemented Interfaces:
java.lang.Cloneable, Identifiable, java.util.Map, java.io.Serializable

public class UnitsCGS
extends UnitsTable

Class UnitsCGS models all of the CGS units as a UnitsTable.

Since:
V_0_4
Version:
$Revision: 1.3 $
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
UnitsCGS()
          Construct a new table of CGS 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

UnitsCGS

public UnitsCGS()
Construct a new table of CGS 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.