edu.nrao.sss.measure
Class AngularVelocityUnits

java.lang.Object
  extended by edu.nrao.sss.measure.AngularVelocityUnits
All Implemented Interfaces:
Symbolic

public class AngularVelocityUnits
extends Object
implements Symbolic

Units of angular velocity.

Version Info:

$Revision: 1586 $
$Date: 2008-10-01 10:38:49 -0600 (Wed, 01 Oct 2008) $
$Author: dharland $ (last person to modify)

Since:
2006-05-30
Author:
David M. Harland

Field Summary
static AngularVelocityUnits ARC_SECONDS_PER_DAY
          Arcseconds per day.
static AngularVelocityUnits MILLI_ARC_SECONDS_PER_YEAR
          Milliarcseconds per year.
 
Method Summary
 boolean equals(Object o)
          Returns true if o is equal to this units.
static AngularVelocityUnits from(ArcUnits angleUnits, TimeUnits timeUnits)
          Returns angular velocity units for the given angle and time units.
static AngularVelocityUnits fromString(String text)
          Returns the angular velocity units represented by text.
 ArcUnits getArcUnits()
          Returns the units of arc used by this unit of velocity.
static AngularVelocityUnits getDefault()
          Returns default units for angular velocity.
static List<AngularVelocityUnits> 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 ArcUnits or TimeUnits class has case-sensitive symbols.
 String toString()
          Returns a text representation of this unit of angular velocity.
 BigDecimal toUnits(AngularVelocityUnits 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

ARC_SECONDS_PER_DAY

public static final AngularVelocityUnits ARC_SECONDS_PER_DAY
Arcseconds per day.


MILLI_ARC_SECONDS_PER_YEAR

public static final AngularVelocityUnits MILLI_ARC_SECONDS_PER_YEAR
Milliarcseconds per year.

Method Detail

from

public static AngularVelocityUnits from(ArcUnits angleUnits,
                                        TimeUnits timeUnits)
Returns angular velocity units for the given angle and time units. Successive calls to this method with the same parameters will return the same object, not new equal objects.

Parameters:
angleUnits - units of arc, the numerator for the returned velocity units.
timeUnits - units of time, the denominator for the returned velocity units.
Returns:
angular velocity units of angleUnits per timeUnits.

getDefault

public static AngularVelocityUnits getDefault()
Returns default units for angular velocity.

Returns:
default units for angular velocity.

getFrequentlyUsedUnits

public static List<AngularVelocityUnits> getFrequentlyUsedUnits()
Returns a list of frequently used velocity units. This is a small subset of the total set of units that could be produced by all combinations of ArcUnits and TimeUnits.

Returns:
a list of frequently used velocity units.

symbolsAreCaseSensitive

public boolean symbolsAreCaseSensitive()
Returns true if either the ArcUnits or TimeUnits class has case-sensitive symbols.

Specified by:
symbolsAreCaseSensitive in interface Symbolic
Returns:
true if the case of the symbols carry meaning.

getArcUnits

public ArcUnits getArcUnits()
Returns the units of arc used by this unit of velocity.

Returns:
the units of arc used by this unit of velocity.

getTimeUnits

public TimeUnits getTimeUnits()
Returns the units of time used by this unit of velocity.

Returns:
the units of time used by this unit of velocity.

toUnits

public BigDecimal toUnits(AngularVelocityUnits otherUnits)
Returns a factor for converting from this unit to otherUnits.

Parameters:
otherUnits - the unit to which conversion is desired.
Returns:
a factor for converting from this unit to otherUnits.

getSymbol

public String getSymbol()
Returns the symbol for this unit.

Specified by:
getSymbol in interface Symbolic
Returns:
the symbol for this unit.

name

public String name()
Returns the name of this unit. This method is here for historical reasons; it mimics the behavior this method had when this class had been an enum class. The toString() is a better alternative.

Returns:
the name of this unit.

toString

public String toString()
Returns a text representation of this unit of angular velocity.

Overrides:
toString in class Object
Returns:
a text representation of this unit of angular velocity.

fromString

public static AngularVelocityUnits fromString(String text)
Returns the angular velocity units represented by text.

Two basic formats for text are employed, both based on the text representations of the component angle and time units. The first is of the form arcUnits.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 arcUnits.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).

Parameters:
text - a text representation of a unit of linear velocity.
Returns:
the linear velocity units represented by text.

equals

public boolean equals(Object o)
Returns true if o is equal to this units.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code for this units.

Overrides:
hashCode in class Object


Copyright © 2009. All Rights Reserved.