|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.measure.LinearVelocityUnits
public class LinearVelocityUnits
Units of linear velocity.
Version Info:
$Revision: 1586 $ |
$Date: 2008-10-01 10:38:49 -0600 (Wed, 01 Oct 2008) $ |
$Author: dharland $ (last person to modify) |
Field Summary | |
---|---|
static LinearVelocityUnits |
KILOMETERS_PER_SECOND
Kilometers per second. |
static LinearVelocityUnits |
METERS_PER_SECOND
Meters per second. |
static LinearVelocityUnits |
Z
A redshift measurement related to velocity. |
Method Summary | |
---|---|
boolean |
equals(Object o)
Returns true if o is equal to this units. |
static LinearVelocityUnits |
from(DistanceUnits distanceUnits,
TimeUnits timeUnits)
Returns linear velocity units for the given distance and time units. |
static LinearVelocityUnits |
fromString(String text)
Returns the linear velocity units represented by text . |
static LinearVelocityUnits |
getDefault()
Returns a default unit of linear velocity. |
DistanceUnits |
getDistanceUnits()
Returns the units of distance used by this unit of velocity. |
static List<LinearVelocityUnits> |
getFrequentlyUsedUnits()
Returns a list of frequently used velocity units. |
String |
getSymbol()
Returns the symbol for this unit. |
TimeUnits |
getTimeUnits()
Returns the units of time used by this unit of velocity. |
int |
hashCode()
Returns a hash code for this units. |
String |
name()
Returns the name of this unit. |
boolean |
symbolsAreCaseSensitive()
Returns true if either the DistanceUnits or TimeUnits
class has case-sensitive symbols. |
static void |
throwBadUnitsText(String text,
DistanceUnits du,
TimeUnits tu)
|
String |
toString()
Returns a text representation of this unit of linear velocity. |
BigDecimal |
toUnits(LinearVelocityUnits otherUnits)
Returns a factor for converting from this unit to otherUnits . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final LinearVelocityUnits METERS_PER_SECOND
public static final LinearVelocityUnits KILOMETERS_PER_SECOND
public static final LinearVelocityUnits Z
For more information on the relationship of z to velocity, see these references:
Method Detail |
---|
public static LinearVelocityUnits from(DistanceUnits distanceUnits, TimeUnits timeUnits)
distanceUnits
- units of distance, the numerator for the returned velocity units.timeUnits
- units of time, the denominator for the returned velocity units.
public static LinearVelocityUnits getDefault()
public static List<LinearVelocityUnits> getFrequentlyUsedUnits()
DistanceUnits
and TimeUnits
.
public boolean symbolsAreCaseSensitive()
DistanceUnits
or TimeUnits
class has case-sensitive symbols.
symbolsAreCaseSensitive
in interface Symbolic
public DistanceUnits getDistanceUnits()
public TimeUnits getTimeUnits()
public BigDecimal toUnits(LinearVelocityUnits otherUnits)
otherUnits
.
otherUnits
- the unit to which conversion is desired.
otherUnits
.public String getSymbol()
getSymbol
in interface Symbolic
public String name()
toString()
is a better alternative.
public String toString()
toString
in class Object
public static LinearVelocityUnits fromString(String text)
text
.
Two basic formats for text are employed, both based on the
text representations of the component distance and time units.
The first is of the form
distUnits.symbol / timeUnits.symbol.
The amount of space surrounding the "/" separator is not material;
zero or more spaces are allowed on either side of the separator.
The second is of the form
distUnits.name per timeUnits.name.
The case of the separator "per" is not material. The same comment about
whitespace given above applies here as well.
The rules governing the format of the symbol or name of the component
units are given in
EnumerationUtility.enumFromString(Class, String)
.
text
- a text representation of a unit of linear velocity.
text
.
IllegalArgumentException
- if text cannot be parsed to a valid units.public static void throwBadUnitsText(String text, DistanceUnits du, TimeUnits tu) throws IllegalArgumentException
IllegalArgumentException
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |