|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectucar.units.BaseQuantity
public abstract class BaseQuantity
Provides support for abstract base quantities (ex: length, time).
| Field Summary | |
|---|---|
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. |
| Constructor Summary | |
|---|---|
|
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. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
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.| Method Detail |
|---|
public String getName()
null or
empty.public String getSymbol()
null. If
non-null, then shall not be empty.public final String getID()
getID in interface Basepublic final String toString()
toString in class Objectpublic boolean equals(Object object)
equals in interface Baseequals in class Objectobject - The object to examine.
true if an only if this base quantity is
semantically identical to object.public int hashCode()
hashCode in class Objectpublic int compareTo(BaseQuantity that)
compareTo in interface Comparable<BaseQuantity>that - The BaseQuantity to compare against.
that.public abstract boolean isDimensionless()
isDimensionless in interface Basetrue if an only if this BaseQuantity is
dimensionless (e.g. BaseQuantity.SOLID_ANGLE).public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||