public class NetcdfQuantityDB extends QuantityDB
emptyDB
Constructor and Description |
---|
NetcdfQuantityDB(QuantityDB db)
Constructs from another quantity database.
|
Modifier and Type | Method and Description |
---|---|
void |
add(String name,
Quantity quantity)
Adds a given Quantity to the database under a given name.
|
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.
|
Quantity |
getBest(String longName,
String name)
Return the VisAD quantity corresponding to the best combination of
long name and name.
|
Iterator |
nameIterator()
Returns an iterator of the names in the database.
|
Iterator |
quantityIterator()
Returns an iterator of the quantities in the database.
|
add, get
public NetcdfQuantityDB(QuantityDB db)
public void add(String name, Quantity quantity) throws VisADException
add
in class QuantityDB
name
- The name under which the quantity is to be
added. May be an alias.quantity
- The quantity to be added.VisADException
- Couldn't create necessary VisAD object.public Quantity getBest(String longName, String name)
longName
- The long name of the quantity. May be
null
.name
- The name of the quantity.null
if no such quantity exists.public Iterator nameIterator()
nameIterator
in class QuantityDB
public Iterator quantityIterator()
quantityIterator
in class QuantityDB
public Quantity[] get(Unit unit)
get
in class QuantityDB
unit
- The unit of the quantity.unit
.public Quantity get(String name)
get
in class QuantityDB
name
- The name of the quantity.name
. Note that
RETURN_VALUE.getName().equals(name)
can
be false due to aliasing.
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.