|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.measure.EquatorialArc<A>
public abstract class EquatorialArc<A extends EquatorialArc<A>>
An arc of either latitude or longitude on a sphere.
Version Info:
$Revision: 1707 $ |
$Date: 2008-11-14 10:23:59 -0700 (Fri, 14 Nov 2008) $ |
$Author: dharland $ (last person to modify) |
Method Summary | |
---|---|
A |
add(A otherArc)
Adds the other arc to this one. |
A |
add(Angle addend)
Adds the given angle to this arc. |
A |
add(BigDecimal amount)
Adds amount , assumed to be in the same units as this
arc, to this arc. |
A |
add(BigDecimal amount,
ArcUnits units)
Adds amount units to this arc. |
A |
add(String amount)
Adds amount , assumed to be in the same units as this
arc, to this arc. |
A |
add(String amount,
ArcUnits units)
Adds amount units to this arc. |
A |
clone()
Returns an arc that is equal to this one. |
int |
compareTo(A otherArc)
Compares this arc with the otherArc for order. |
A |
convertTo(ArcUnits newUnits)
Converts this arc to the new units. |
boolean |
equals(Object o)
Returns true if o is equal to this arc. |
ArcUnits |
getUnits()
Returns the units of this arc. |
BigDecimal |
getValue()
Returns the magnitude of this arc. |
int |
hashCode()
Returns a hash code value for this arc. |
void |
set(BigDecimal newValue,
ArcUnits newUnits)
Sets the magnitude and units of this arc. |
void |
set(String newValue,
ArcUnits newUnits)
Sets the magnitude and units of this arc. |
A |
subtract(A otherArc)
Subtracts the other arc from this one. |
A |
subtract(Angle subtrahend)
Subtracts the given angle from this arc. |
A |
subtract(BigDecimal amount)
Subtracts amount , assumed to be in the same units as this
declination, from this arc. |
A |
subtract(BigDecimal amount,
ArcUnits units)
Subtracts amount units from this arc. |
A |
subtract(String amount)
Subtracts amount , assumed to be in the same units as this
declination, from this arc. |
A |
subtract(String amount,
ArcUnits units)
Subtracts amount units from this arc. |
Angle |
toAngle()
Returns this arc as an Angle. |
Number[] |
toDms()
Returns a representation of this arc in degrees, minutes, and seconds. |
Number[] |
toHms()
Returns a representation of this arc in hours, minutes, and seconds. |
String |
toString()
Returns a text representation of this arc. |
String |
toString(int minFracDigits,
int maxFracDigits)
Returns a text representation of this arc. |
String |
toStringDms()
Returns a text representation of this angle in degrees, arc-minutes, and arc-seconds. |
String |
toStringDms(int minFracDigits,
int maxFracDigits)
Returns a text representation of this angle in degrees, arc-minutes, and arc-seconds. |
String |
toStringDmsHtml(int minFracDigits,
int maxFracDigits)
Returns a text representation of this angle in degrees, arc-minutes, and arc-seconds, with HTML-friendly symbols. |
String |
toStringHms()
Returns a text representation of this angle in hours, minutes, and seconds. |
String |
toStringHms(int minFracDigits,
int maxFracDigits)
Returns a text representation of this angle in hours, minutes, and seconds. |
BigDecimal |
toUnits(ArcUnits otherUnits)
Returns the magnitude of this arc in otherUnits . |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public BigDecimal getValue()
public ArcUnits getUnits()
public void set(BigDecimal newValue, ArcUnits newUnits)
newValue
- the new magnitude for this arc.newUnits
- the new units for this declination.
IllegalArgumentException
- if the new value is outside of
its legal range.public void set(String newValue, ArcUnits newUnits)
newValue
- the new magnitude for this arc.newUnits
- the new units for this declination.
IllegalArgumentException
- if the new value is outside of
its legal range.public A add(BigDecimal amount)
amount
, assumed to be in the same units as this
arc, to this arc.
If the addition of amount
leads to a value that is
out of bounds, the result will be normalized in such a way
that it is the equivalent in-bounds value.
amount
- an amount to be added to this arc.
public A add(String amount)
amount
, assumed to be in the same units as this
arc, to this arc.
If the addition of amount
leads to a value that is
out of bounds, the result will be normalized in such a way
that it is the equivalent in-bounds value.
amount
- an amount to be added to this arc.
public A add(BigDecimal amount, ArcUnits units)
amount
units
to this arc.
If the addition of amount
leads to a value that is
out of bounds, the result will be normalized in such a way
that it is the equivalent in-bounds value.
amount
- an amount to be added to this arc.units
- the units in which amount
is expressed.
public A add(String amount, ArcUnits units)
amount
units
to this arc.
If the addition of amount
leads to a value that is
out of bounds, the result will be normalized in such a way
that it is the equivalent in-bounds value.
amount
- an amount to be added to this arc.units
- the units in which amount
is expressed.
public A add(Angle addend)
If the addition of addend
leads to a value that is
out of bounds, the result will be normalized in such a way
that it is the equivalent in-bounds value.
addend
- an angle to be added to this one.
public A add(A otherArc)
If the addition of otherArc
leads to a value that is
out of bounds, the result will be normalized in such a way
that it is the equivalent in-bounds value.
otherArc
- an arc to be added to this one.
public A subtract(BigDecimal amount)
amount
, assumed to be in the same units as this
declination, from this arc.
If the subtraction of amount
leads to a value that is
out of bounds, the result will be normalized in such a way
that it is the equivalent in-bounds value.
amount
- an amount to be subtracted from this arc.
public A subtract(String amount)
amount
, assumed to be in the same units as this
declination, from this arc.
If the subtraction of amount
leads to a value that is
out of bounds, the result will be normalized in such a way
that it is the equivalent in-bounds value.
amount
- an amount to be subtracted from this arc.
public A subtract(BigDecimal amount, ArcUnits units)
amount
units
from this arc.
If the subtraction of amount
leads to a value that is
out of bounds, the result will be normalized in such a way
that it is the equivalent in-bounds value.
amount
- an amount to be subtracted from this arc.units
- the units in which amount
is expressed.
public A subtract(String amount, ArcUnits units)
amount
units
from this arc.
If the subtraction of amount
leads to a value that is
out of bounds, the result will be normalized in such a way
that it is the equivalent in-bounds value.
amount
- an amount to be subtracted from this arc.units
- the units in which amount
is expressed.
public A subtract(Angle subtrahend)
If the subtraction of subtrahend
leads to a value that is
out of bounds, the result will be normalized in such a way
that it is the equivalent in-bounds value.
subtrahend
- an angle to be subtracted from this one.
public A subtract(A otherArc)
If the subtraction of otherArc
leads to a value that is
out of bounds, the result will be normalized in such a way
that it is the equivalent in-bounds value.
otherArc
- an arc to be subtracted from this one.
public A convertTo(ArcUnits newUnits)
After this method is complete this arc will have units of
units
and its value will have been converted
accordingly.
newUnits
- the new units for this arc. If newUnits
is null it will be treated as
ArcUnits.DEGREE
.
double radians =
myArc.convertTo(ArcUnits.RADIAN).getValue();
public BigDecimal toUnits(ArcUnits otherUnits)
otherUnits
.
Note that this method does not alter the state of this arc.
Contrast this with convertTo(ArcUnits)
.
otherUnits
- the units in which to express this arc's magnitude.
otherUnits
.public Angle toAngle()
public Number[] toDms()
public Number[] toHms()
public String toString()
toString
in class Object
public String toString(int minFracDigits, int maxFracDigits)
minFracDigits
- the minimum number of places after the decimal point.maxFracDigits
- the maximum number of places after the decimal point.public String toStringHms()
public String toStringHms(int minFracDigits, int maxFracDigits)
minFracDigits
- the minimum number of places after the decimal point
for the seconds field.maxFracDigits
- the maximum number of places after the decimal point
for the seconds field.public String toStringDms()
public String toStringDms(int minFracDigits, int maxFracDigits)
minFracDigits
- the minimum number of places after the decimal point
for the seconds field.maxFracDigits
- the maximum number of places after the decimal point
for the seconds field.public String toStringDmsHtml(int minFracDigits, int maxFracDigits)
minFracDigits
- the minimum number of places after the decimal point
for the seconds field.maxFracDigits
- the maximum number of places after the decimal point
for the seconds field.public A clone()
clone
in class Object
public boolean equals(Object o)
o
is equal to this arc.
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(A otherArc)
otherArc
for order.
compareTo
in interface Comparable<A extends EquatorialArc<A>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |