public abstract class BaseQuantity extends java.lang.Object implements Base, java.lang.Comparable<BaseQuantity>, java.io.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(java.lang.String name,
java.lang.String symbol)
Constructs from a name and a symbol.
|
protected |
BaseQuantity(java.lang.String name,
java.lang.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(java.lang.Object object)
Indicates if this base quantity is semantically identical to an object.
|
java.lang.String |
getID()
Returns the identifier for the base quantity.
|
java.lang.String |
getName()
Returns the name of the base quantity.
|
java.lang.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(java.lang.String[] args)
Tests this class.
|
java.lang.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(java.lang.String name, java.lang.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(java.lang.String name, java.lang.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 java.lang.String getName()
null
or
empty.public java.lang.String getSymbol()
null
. If
non-null
, then shall not be empty.public final java.lang.String getID()
public final java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object object)
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(BaseQuantity that)
compareTo
in interface java.lang.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(java.lang.String[] args)