jasi.sim.geo.spherical
Class Longitude

java.lang.Object
  extended by jasi.sim.basic.value.AbstractSimValueType
      extended by jasi.sim.basic.value.AbstractComparableObject<T>
          extended by jasi.sim.geo.ComparableGeoObject<Arc>
              extended by jasi.sim.geo.spherical.Arc
                  extended by jasi.sim.geo.spherical.Longitude
All Implemented Interfaces:
ExtendedComparable<Arc>, SimValue, Geometric, java.io.Serializable, java.lang.Comparable<Arc>

public final class Longitude
extends Arc

Longitude is the angle of a location's meridian to the zero-meridian. Its value ranges from 0 to 180 east positive, west negative.

See Also:
Serialized Form

Field Summary
static Longitude GREENWICH
          Longitude.
 
Fields inherited from class jasi.sim.geo.spherical.Arc
CIRCLE, HALF_CIRCLE, RECTANGLE, ZERO
 
Fields inherited from interface jasi.sim.geo.Geometric
BEGIN, END, MIDLE
 
Constructor Summary
Longitude(double arc)
          Constructor of a longitude.
Longitude(Longitude arc)
          Constructor of a longitude.
Longitude(java.lang.String s)
          Constructor of a longitude.
 
Method Summary
protected  double convert(java.lang.String s)
          Convert that string to an lattitude value.
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 double getLength()
          Get length of this longitude.
 int hashCode()
          Returns a hash code value for the object.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class jasi.sim.geo.spherical.Arc
acos, add, amount, asin, compareTo, cos, fit, length, minus, sin, times, toDegree, toRadians, toRadians
 
Methods inherited from class jasi.sim.basic.value.AbstractComparableObject
isEQ, isGE, isGT, isLE, isLT, isNE
 
Methods inherited from class jasi.sim.basic.value.AbstractSimValueType
getContent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jasi.sim.basic.value.SimValue
getContent
 

Field Detail

GREENWICH

public static final Longitude GREENWICH
Longitude.

Constructor Detail

Longitude

public Longitude(double arc)
Constructor of a longitude.

Parameters:
arc - The arc.

Longitude

public Longitude(java.lang.String s)
Constructor of a longitude.

Parameters:
s - The string representation of a longitude.
Throws:
java.lang.IllegalArgumentException - If the string can not be translated.

Longitude

public Longitude(Longitude arc)
Constructor of a longitude.

Parameters:
arc - The arc.
Method Detail

getLength

public double getLength()
Get length of this longitude.

Returns:
The longitude.

convert

protected double convert(java.lang.String s)
Convert that string to an lattitude value.

Overrides:
convert in class Arc
Parameters:
s - The string representing a lattitude.
Returns:
The lattitude value
Throws:
java.lang.IllegalArgumentException - When string could not be analyzed.

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Arc
Parameters:
o - That object which is compared with this object.
Returns:
True, if this object is the same as that object.

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class Arc
Returns:
A hash code value for this object.

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class Arc
Returns:
The string.