|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
java.util.HashMap
com.rubecula.util.StringMap
com.rubecula.units.UnitsTable
This class extends HashMap to provide a table of units values.
Nested Class Summary |
Nested classes inherited from class java.util.HashMap |
|
Nested classes inherited from class java.util.AbstractMap |
|
Field Summary | |
private java.lang.String |
_Name
|
private SystemFlag |
_System
|
Fields inherited from class java.util.HashMap |
|
Fields inherited from class java.util.AbstractMap |
|
Constructor Summary | |
UnitsTable(java.lang.String name,
SystemFlag system)
|
Method Summary | |
void |
audit(java.io.PrintStream stream)
|
Measurable |
findParallel(Measurable units)
Method to lookup a Measurable from this which is parallel to units. |
Measurable |
findParallel(Measurable units,
SystemFlag system)
Method to lookup a Measurable from this which is parallel to units and which is in system (if specified). |
Measurable |
findParallel(Measurable units,
SystemFlag system,
boolean named)
Method to lookup a Measurable from this which is parallel to units and which is in system (if specified) |
java.lang.String |
getIdentifier()
Method to get the specific identifier for an object. |
java.lang.String |
getName()
|
SystemFlag |
getSystem()
|
Measurable |
lookup(java.lang.String name)
Method to lookup a Measurable by key. |
Measurable |
lookup(java.lang.String name,
boolean matchOK)
Method to lookup a Measurable by key (or by matching the name if matchOK is true) in this UnitsTable. |
Measurable |
match(Measurable units)
Method to lookup a Measurable by key (or by matching the name if matchOK is true) in this UnitsTable. |
(package private) Measurable |
put(Measurable unit)
Method to insert a unit in this table. |
java.lang.String |
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 |
Field Detail |
private final java.lang.String _Name
private final SystemFlag _System
Constructor Detail |
public UnitsTable(java.lang.String name, SystemFlag system)
Method Detail |
Measurable put(Measurable unit)
unit
- the Measurable instance to be inserted.
UnitsException
- if name is not unique.public Measurable lookup(java.lang.String name, boolean matchOK)
name
- the key of the desired Measurable, or (if matchOK true) a
string which will match
one of the elements in the table (the first to be found).matchOK
- true if it is OK to accept a Measurable whose name matches
when the name does not match a key.
public Measurable lookup(java.lang.String name)
name
- the key of the desired Measurable
public Measurable match(Measurable units)
units
- the units to match with one in this table.
public Measurable findParallel(Measurable units, SystemFlag system, boolean named)
units
- the units to match with one in this table.system
- the system to which result must belong (or null if don't care).named
- whether or not we insist that the parallel unit found must be named.
public Measurable findParallel(Measurable units, SystemFlag system)
units
- the units to match with one in this table.system
- the system to which result must belong (or null if don't care).
public Measurable findParallel(Measurable units)
units
- the units to match with one in this table.
public java.lang.String toString()
public void audit(java.io.PrintStream stream)
public java.lang.String getIdentifier()
Identifiable
getIdentifier
in interface Identifiable
public java.lang.String getName()
public SystemFlag getSystem()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |