public abstract class BaseQuantity extends Object implements Base, Comparable<BaseQuantity>, Serializable
Modifier and Type | Field and Description |
---|---|
static RegularBaseQuantity |
AMOUNT_OF_SUBSTANCE
The base quantity of amount of substance.
|
static RegularBaseQuantity |
ELECTRIC_CURRENT
The base quantity of electric current.
|
static RegularBaseQuantity |
LENGTH
The base quantity of length.
|
static RegularBaseQuantity |
LUMINOUS_INTENSITY
The base quantity of luminous intensity.
|
static RegularBaseQuantity |
MASS
The base quantity of mass.
|
static SupplementaryBaseQuantity |
PLANE_ANGLE
The base quantity of plane angle.
|
static SupplementaryBaseQuantity |
SOLID_ANGLE
The base quantity of solid angle.
|
static RegularBaseQuantity |
THERMODYNAMIC_TEMPERATURE
The base quantity of themodynamic temperature.
|
static RegularBaseQuantity |
TIME
The base quantity of time.
|
static UnknownBaseQuantity |
UNKNOWN
The unknown base quantity.
|
Modifier | Constructor and Description |
---|---|
|
BaseQuantity(String name,
String symbol)
Constructs from a name and a symbol.
|
protected |
BaseQuantity(String name,
String symbol,
boolean trusted)
Constructs from a name and a symbol.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(BaseQuantity that)
Compares this base quantity to another base quantity.
|
boolean |
equals(Object object)
Indicates if this base quantity is semantically identical to an object.
|
String |
getID()
Returns the identifier for the base quantity.
|
String |
getName()
Returns the name of the base quantity.
|
String |
getSymbol()
Returns the symbol of the base quantity.
|
int |
hashCode()
Returns the hash code of this instance.
|
abstract boolean |
isDimensionless()
Indicates if this base quantity is dimensionless.
|
static void |
main(String[] args)
Tests this class.
|
String |
toString()
Returns the string representation of the base quantity.
|
public static final RegularBaseQuantity AMOUNT_OF_SUBSTANCE
public static final RegularBaseQuantity ELECTRIC_CURRENT
public static final RegularBaseQuantity LENGTH
public static final RegularBaseQuantity LUMINOUS_INTENSITY
public static final RegularBaseQuantity MASS
public static final SupplementaryBaseQuantity PLANE_ANGLE
public static final SupplementaryBaseQuantity SOLID_ANGLE
public static final RegularBaseQuantity THERMODYNAMIC_TEMPERATURE
public static final RegularBaseQuantity TIME
public static final UnknownBaseQuantity UNKNOWN
public BaseQuantity(String name, String symbol) throws NameException
name
- Name of the base quantity. Shall be neither null
nor empty.symbol
- Symbol for the base quantity. May be null
but
shall not be empty.NameException
- name
is null
or empty.protected BaseQuantity(String name, String symbol, boolean trusted)
name
- Name of the base quantity. Shall be neither null
nor empty.symbol
- Symbol for the base quantity. May be null
but
shall not be empty.public String getName()
null
or
empty.public String getSymbol()
null
. If
non-null
, then shall not be empty.public final String getID()
public final String toString()
public boolean equals(Object object)
public int hashCode()
public int compareTo(BaseQuantity that)
compareTo
in interface Comparable<BaseQuantity>
that
- The BaseQuantity to compare against.that
.public abstract boolean isDimensionless()
isDimensionless
in interface Base
true
if an only if this BaseQuantity is
dimensionless (e.g. BaseQuantity.SOLID_ANGLE
).public static void main(String[] args)
Copyright © 1999–2016 UCAR/Unidata. All rights reserved.