|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.BaseQuantity
public final class BaseQuantity
This class represents a base quantity (e.g. "length"). This class is mutable but monotonic: new base quantities can be added but not removed.
Method Summary | |
---|---|
static BaseQuantity |
add(String name)
Add a base quantity to the database. |
static BaseQuantity |
add(String name,
String alias)
Add a base quantity with an alias to the database. |
static BaseQuantity |
add(String name,
String[] aliases)
Add a base quantity with aliases to the database. |
static BaseQuantity |
get(int i)
Retrieve the base quantity associated with a given index. |
static BaseQuantity |
get(String name)
Retrieve a base quantity from the database based on a match of either the name or an alias. |
static BaseQuantity |
getByAlias(String name)
Retrieve a base quantity from the database based on a match of an alias. |
static BaseQuantity |
getByName(String name)
Retrieve a base quantity from the database based on a match of the name. |
int |
getIndex()
Return the index of this base quantity. |
String |
getName()
Return the name of this base quantity. |
static int |
size()
Return the number of base qantities in the database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static BaseQuantity add(String name) throws VisADException
name
- The name of the base quantity.
VisADException
- Attempt to redefine an existing base quantity.name
isn't already in the database.public static BaseQuantity add(String name, String alias) throws VisADException
name
- The name of the base quantity being added to
the database (e.g. "plane angle", "foobility").alias
- An alias for the base quantity (e.g. "angle").
VisADException
- Attempt to redefine an existing base quantity
or alias. If thrown, then the database is
unmodified.name
nor alias
is in the database.public static BaseQuantity add(String name, String[] aliases) throws VisADException
name
- The name of the base quantity being added to
the database (e.g. "plane angle", "foobility").aliases
- Aliases for the base quantity (e.g. "angle").
VisADException
- Attempt to redefine an existing base quantity
or alias. If thrown, then the database is
unmodified.name
nor any name in
aliases
is in the database.size()
will return one greater
than on entry.public static int size()
public String getName()
public int getIndex()
public static BaseQuantity getByName(String name)
name
- The name of the base quantity to be retrieved.
name
or null
if
no such quantity exists.public static BaseQuantity getByAlias(String name)
name
- An alias of the base quantity to be retrieved.
name
or null
if
no such quantity exists.public static BaseQuantity get(String name)
name
- The name or an alias of the base quantity to
be retrieved.
name
or null
if
no such quantity exists.public static BaseQuantity get(int i)
i
- The origin-0 index of the base quantity.
i
.i >= 0 && i < size()
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |