Jeospace API

org.jeospace.measure.angle
Interface Angle

All Superinterfaces:
java.lang.Comparable
All Known Implementing Classes:
DecimalAngle, SexagesimalAngle

public interface Angle
extends java.lang.Comparable

Angle provides the base operations for setting, getting and manipulating angular measurement values.

Version:
$Revision: 1.1.1.1 $
Author:
Rex Melton

Method Summary
 void add(Angle value)
          Add to this Angle the passed Angle.
 void add(DecimalAngleUnit units, double value)
          Add to this Angle the double value in the specified DecimalAngleUnits.
 void add(SexagesimalAngleUnit units, int value)
          Add to this Angle the value in the specified SexagesimalAngleUnits.
 void changeSign()
          Change the sign of this Angle.
 void clear()
          Set the value of this Angle to 0.
 int compareTo(Angle that)
          Compare this object with the argument for order.
 int compareTo(java.lang.Object obj)
          Compare this object with the argument for order.
 double get(DecimalAngleUnit units)
          Return the double value of this Angle in the specified DecimalAngleUnits.
 AngleSign getSign()
          Get the AngleSign of this Angle.
 long getValueInMicroseconds(SexagesimalAngleType type)
          Return the long value of this Angle in units of microseconds of the specified SexagesimalAngleType.
 void normalize(AngleNorm option)
          Normalize the value of this DecimalAngle as specified by the option field.
 void set(Angle ang)
          Set this Angle to the specified value.
 void set(DecimalAngleUnit units, double value)
          Set the value of this Angle to the specified DecimalAngleUnits value.
 void set(SexagesimalAngleType type, AngleSign sign, double unitsValue)
          Set this Angle to the specified value in the SexagesimalAngleType.
 void set(SexagesimalAngleType type, AngleSign sign, int unitsValue, double minutes)
          Set this Angle to the specified value in the SexagesimalAngleType.
 void set(SexagesimalAngleType type, AngleSign sign, int unitsValue, int minutes, double seconds)
          Set this Angle to the specified value in the SexagesimalAngleType.
 void set(SexagesimalAngleType type, AngleSign sign, int unitsValue, int minutes, int seconds, int microseconds)
          Set this Angle to the specified value in the SexagesimalAngleType.
 void setValueInMicroseconds(SexagesimalAngleType type, long value)
          Set this Angle to the specified value of microseconds of the SexagesimalAngleType.
 void subtract(Angle value)
          Subtract from this Angle the passed Angle.
 

Method Detail

set

public void set(Angle ang)
Set this Angle to the specified value.

Parameters:
ang - the Angle object to duplicate.

clear

public void clear()
Set the value of this Angle to 0.


changeSign

public void changeSign()
Change the sign of this Angle.


getSign

public AngleSign getSign()
Get the AngleSign of this Angle.


add

public void add(Angle value)
Add to this Angle the passed Angle.

Parameters:
value - an Angle.

subtract

public void subtract(Angle value)
Subtract from this Angle the passed Angle.

Parameters:
value - an Angle.

normalize

public void normalize(AngleNorm option)
Normalize the value of this DecimalAngle as specified by the option field.

Parameters:
option - the AngleNorm identifier

set

public void set(DecimalAngleUnit units,
                double value)
Set the value of this Angle to the specified DecimalAngleUnits value.

Parameters:
units - the DecimalAngleUnits.
value - the double value.

get

public double get(DecimalAngleUnit units)
Return the double value of this Angle in the specified DecimalAngleUnits.

Parameters:
units - the DecimalAngleUnits.
Returns:
the double value of this Angle.

add

public void add(DecimalAngleUnit units,
                double value)
Add to this Angle the double value in the specified DecimalAngleUnits.

Parameters:
units - the DecimalAngleUnits.
value - the double value.

set

public void set(SexagesimalAngleType type,
                AngleSign sign,
                double unitsValue)
Set this Angle to the specified value in the SexagesimalAngleType.

Parameters:
type - the SexagesimalAngleType.
sign - the AngleSign.
unitsValue - the double value of the primary units of the SexagesimalAngleType.

set

public void set(SexagesimalAngleType type,
                AngleSign sign,
                int unitsValue,
                double minutes)
Set this Angle to the specified value in the SexagesimalAngleType.

Parameters:
type - the SexagesimalAngleType.
sign - the AngleSign.
unitsValue - the integer value of the primary units of the SexagesimalAngleType.
minutes - the double value of the minutes sub-unit of the SexagesimalAngleType.

set

public void set(SexagesimalAngleType type,
                AngleSign sign,
                int unitsValue,
                int minutes,
                double seconds)
Set this Angle to the specified value in the SexagesimalAngleType.

Parameters:
type - the SexagesimalAngleType.
sign - the AngleSign.
unitsValue - the integer value of the primary units of the SexagesimalAngleType.
minutes - the integer value of the minutes sub-unit of the SexagesimalAngleType.
seconds - the double value of the seconds sub-unit of the SexagesimalAngleType.

set

public void set(SexagesimalAngleType type,
                AngleSign sign,
                int unitsValue,
                int minutes,
                int seconds,
                int microseconds)
Set this Angle to the specified value in the SexagesimalAngleType.

Parameters:
type - the SexagesimalAngleType.
sign - the AngleSign.
unitsValue - the integer value of the primary units of the SexagesimalAngleType.
minutes - the integer value of the minutes sub-unit of the SexagesimalAngleType.
seconds - the integer value of the seconds sub-unit of the SexagesimalAngleType.
microseconds - the integer value of the microseconds sub-unit of the SexagesimalAngleType.

setValueInMicroseconds

public void setValueInMicroseconds(SexagesimalAngleType type,
                                   long value)
Set this Angle to the specified value of microseconds of the SexagesimalAngleType. (i.e. either in microseconds of of degree or microseconds of hour)

Parameters:
type - the SexagesimalAngleType.
value - the long value in microseconds to set for this Angle.

getValueInMicroseconds

public long getValueInMicroseconds(SexagesimalAngleType type)
Return the long value of this Angle in units of microseconds of the specified SexagesimalAngleType. (i.e. either in microseconds of of degree or microseconds of hour)

Parameters:
type - the SexagesimalAngleType.
Returns:
the long value of this Angle in microseconds.

add

public void add(SexagesimalAngleUnit units,
                int value)
Add to this Angle the value in the specified SexagesimalAngleUnits.

Parameters:
units - the SexagesimalAngleUnits.
value - the integer value.

compareTo

public int compareTo(java.lang.Object obj)
Compare this object with the argument for order.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - the Object to compare
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
ClassCastException - if the argument is not an Angle.

compareTo

public int compareTo(Angle that)
Compare this object with the argument for order.

Parameters:
that - the Angle to compare
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Jeospace API

Copyright © 2006 - jeospace.org