|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvisad.data.netcdf.QuantityDB
visad.data.netcdf.QuantityDBImpl
public class QuantityDBImpl
Provides support for a database of quantities. Instances are modifiable.
| Nested Class Summary | |
|---|---|
protected class |
QuantityDBImpl.Iterator
Provides support for iterating over the database. |
protected class |
QuantityDBImpl.NameIterator
Provides support for iterating over the names in the database. |
protected static class |
QuantityDBImpl.NameKey
Provides support for keys to the name map. |
protected class |
QuantityDBImpl.QuantityIterator
Provides support for iterating over the quantities in the database. |
protected static class |
QuantityDBImpl.UnitKey
Provides support for keys to the unit map. |
| Field Summary |
|---|
| Fields inherited from class visad.data.netcdf.QuantityDB |
|---|
emptyDB |
| Constructor Summary | |
|---|---|
QuantityDBImpl(QuantityDB nextDB)
Constructs with another quantity database as the successor database. |
|
| Method Summary | |
|---|---|
QuantityDB |
add(Quantity[] quantities)
Adds given Quantity-s to the database. |
QuantityDB |
add(String[] definitions,
String[] aliases)
Adds the given quantities and aliases to the database. |
void |
add(String name,
Quantity quantity)
Adds a quantity to the database under a given name. |
protected void |
add(String name,
String unitSpec)
Adds a quantity to the database given a name and a display unit specification. |
Quantity |
get(String name)
Returns the quantity in the database whose name matches a given name. |
Quantity[] |
get(Unit unit)
Returns all quantities in the database whose default unit is convertible with a given unit. |
Iterator |
nameIterator()
Returns an iterator of the names in the database. |
Iterator |
quantityIterator()
Returns an iterator of the quantities in the database. |
| Methods inherited from class visad.data.netcdf.QuantityDB |
|---|
add, get |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QuantityDBImpl(QuantityDB nextDB)
nextDB - The quantity database to search after this one.
May be null.| Method Detail |
|---|
public QuantityDB add(String[] definitions,
String[] aliases)
throws ParseException,
TypeException,
VisADException
definitions - New quantities and their definitions.
definitions[2*i] contains the
name (e.g. "speed") of the quantity whose
preferred unit specification (e.g. "m/s") is
in definitions[2*i+1].aliases - Aliases for quantities. aliases[2*i]
contains the alias for the quantity
named in aliases[2*i+1].
ParseException - A unit specification couldn't be parsed.
TypeException - An incompatible version of the quantity already
exists.
VisADException - Couldn't create necessary VisAD object.
public void add(String name,
Quantity quantity)
throws VisADException
add in class QuantityDBname - The name of the quantity (e.g. "length").
May be an alias for the quantity.quantity - The quantity.
VisADException - Couldn't create necessary VisAD object.
public QuantityDB add(Quantity[] quantities)
throws VisADException
quantities - The quantities to be added. The quantity will
be added under it own name.
VisADException - Couldn't create necessary VisAD object.
protected void add(String name,
String unitSpec)
throws ParseException,
TypeException,
VisADException
name - The name of the quantity (e.g. "length").unitSpec - The preferred display unit for the
quantity (e.g. "feet").
ParseException - Couldn't decode unit specification.
TypeException - Incompatible ScalarType of same name already
exists.
VisADException - Couldn't create necessary VisAD object.public Iterator quantityIterator()
quantityIterator in class QuantityDBpublic Iterator nameIterator()
nameIterator in class QuantityDBpublic Quantity get(String name)
get in class QuantityDBname - The name of the quantity.
name.public Quantity[] get(Unit unit)
get in class QuantityDBunit - The unit of the quantity.
unit.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||