|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAngle
@Immutable public class Angle
An angle in degrees. An angle is the amount of rotation needed to bring one line or plane into coincidence with another, generally measured in degrees, sexagesimal degrees or grads.
Latitude,
Longitude,
AngleFormat,
Serialized Form
| utility/geotk-utility (download) | View source code for this class |
| Constructor Summary | |
|---|---|
Angle(double theta)
Constructs a new angle with the specified value. |
|
Angle(String string)
Constructs a newly allocated Angle object that represents the angle value
represented by the string. |
|
| Method Summary | |
|---|---|
int |
compareTo(Angle that)
Compares two Angle objects numerically. |
double |
degrees()
Returns the angle value in decimal degrees. |
boolean |
equals(Object object)
Compares the specified object with this angle for equality. |
int |
hashCode()
Returns a hash code for this Angle object. |
double |
radians()
Returns the angle value in radians. |
String |
toString()
Returns a string representation of this Angle object. |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Angle(double theta)
theta - Angle in degrees.
public Angle(String string)
throws NumberFormatException
Angle object that represents the angle value
represented by the string. The string should represents an angle in either fractional
degrees (e.g. 45.5°) or degrees with minutes and seconds (e.g. 45°30').
string - A string to be converted to an Angle.
NumberFormatException - if the string does not contain a parsable angle.| Method Detail |
|---|
public double degrees()
public double radians()
public int hashCode()
Angle object.
hashCode in class Objectpublic boolean equals(Object object)
equals in class Objectobject - The object to compare with this angle for equality.
true if the given object is equal to this angle.public int compareTo(Angle that)
Angle objects numerically. The comparison
is done as if by the Double.compare(double,double) method.
compareTo in interface Comparable<Angle>that - The angle to compare with this object for order.
public String toString()
Angle object.
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||