|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.data.unit.UnitLibrary
A Library containing definitions of commonly used units. Currently, the Unit library is static in the sense that it is loaded when the system starts and is hard-wired to a particular Unit System (the System International Unit System). However, it should be easy to change the architecture so that multiple Unit Systems can be accommodated, and loaded on-the-fly.
| Red (rowland) |
| Red (rowland) |
| Field Summary | |
static Unit |
Identity
|
| Constructor Summary | |
UnitLibrary()
|
|
| Method Summary | |
static void |
addToLibrary(Unit unit)
Add a unit to the Library. |
static Unit |
getBaseUnit(int catNum)
Find the Unit in the library that is basic (scale equal to 1), singular (all but one dimensions equal to 0), XXXXX |
static Unit |
getClosestUnit(Unit unit)
Search Library to find Unit that has the same type and is the closest to a unit in terms of the scalars. |
static java.util.Vector |
getLibrary()
Return the Library. |
static int |
getNumCategories()
Return the number of categories. |
static UParser |
getParser()
Return the Parser. |
static Unit |
getUnit(Unit unit)
Search Library for Unit equal to a particular unit. |
static Unit |
getUnitByName(java.lang.String name)
Search the Library for a unit with a particular name. |
static java.util.Vector |
getUnitsByType(Unit unit)
Search Library for all Units with type equal to this one. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static Unit Identity
| Constructor Detail |
public UnitLibrary()
| Method Detail |
public static void addToLibrary(Unit unit)
unit - Unit to add to the library.public static Unit getBaseUnit(int catNum)
catNum -
public static Unit getClosestUnit(Unit unit)
public static java.util.Vector getLibrary()
public static int getNumCategories()
public static UParser getParser()
public static Unit getUnit(Unit unit)
public static Unit getUnitByName(java.lang.String name)
name - The name of the desired unit.
public static java.util.Vector getUnitsByType(Unit unit)
unit -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||