1.0.0

org.eclipse.soda.dk.data
Class Degree

java.lang.Object
  extended by java.lang.Number
      extended by org.eclipse.soda.dk.data.Fraction
          extended by org.eclipse.soda.dk.data.Degree
All Implemented Interfaces:
java.io.Serializable, Numeric
Direct Known Subclasses:
LatitudeData, LongitudeData

public class Degree
extends Fraction

The Degree data class handles a degree value.

Version:
1.0.0
See Also:
Serialized Form

Field Summary
static int DENOMINATOR
          Define the denominator (int) constant.
static double DOUBLE_DENOMINATOR
          Define the double denominator (double) constant.
static float FLOAT_DENOMINATOR
          Define the float denominator (float) constant.
static int SECONDS_PER_DEGREE
          Define the seconds per degree (int) constant.
static long SECONDS_PER_DEGREE_LONG
          Define the seconds per degree long (long) constant.
static int THOUSAND
          Define the thousand (int) constant.
 
Constructor Summary
Degree(int thousandSeconds)
          Degree constructor with specified degree in billons of seconds.
Degree(int degrees, int minutes, int seconds)
          Degree constructor with specified degree billons.
Degree(java.lang.String value)
          Degree constructor with specified degree string value.
 
Method Summary
 java.lang.Number add(java.lang.Number value)
          Perform the add method and return the Number result.
 java.lang.Number divide(java.lang.Number value)
          Perform the divide method and return the Number result.
 double doubleValue()
           
 boolean equals(java.lang.Object compare)
           
 float floatValue()
           
 int getFixedDegree()
          Method getFixedDegree.
 int getThousandSeconds()
          Method getThousandSeconds.
 int intDenominator()
          Perform the intDenominator method and return the int result.
 int intNumerator()
          Perform the intNumerator method and return the int result.
 int intValue()
           
 long longDenominator()
          Perform the longDenominator method and return the long result.
 long longNumerator()
          Perform the longNumerator method and return the long result.
 long longValue()
           
 java.lang.Number multiply(java.lang.Number value)
          Perform the multiply method and return the Number result.
 java.lang.Number negate()
          Negate and return the Number result.
static long parse(java.lang.String value)
          Parse with the specified value parameter and return the long result.
static int parseBillionDegree(java.lang.String value)
          Parse billion degree with the specified value parameter and return the int result.
static int parseMetarDegree(java.lang.String value)
          Parse metar degree with the specified value parameter and return the int result.
static int parseNmeaDegree(java.lang.String value)
          Parse nmea degree with the specified value parameter and return the int result.
 java.lang.Number reciprocal()
          Reciprocal and return the Number result.
 java.lang.Number subtract(java.lang.Number value)
          Perform the subtract method and return the Number result.
static java.lang.String toDegreeString(int value, java.lang.String additions)
          To degree string with the specified value and additions parameters and return the String result.
 java.lang.String toString()
           
static java.lang.String toString(int value)
          Method toString.
 
Methods inherited from class org.eclipse.soda.dk.data.Fraction
hashCode
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

THOUSAND

public static final int THOUSAND
Define the thousand (int) constant.

See Also:
Constant Field Values

SECONDS_PER_DEGREE

public static final int SECONDS_PER_DEGREE
Define the seconds per degree (int) constant.

See Also:
Constant Field Values

SECONDS_PER_DEGREE_LONG

public static final long SECONDS_PER_DEGREE_LONG
Define the seconds per degree long (long) constant.

See Also:
Constant Field Values

DENOMINATOR

public static final int DENOMINATOR
Define the denominator (int) constant.

See Also:
Constant Field Values

FLOAT_DENOMINATOR

public static final float FLOAT_DENOMINATOR
Define the float denominator (float) constant.

See Also:
Constant Field Values

DOUBLE_DENOMINATOR

public static final double DOUBLE_DENOMINATOR
Define the double denominator (double) constant.

See Also:
Constant Field Values
Constructor Detail

Degree

public Degree(java.lang.String value)
       throws java.lang.NumberFormatException
Degree constructor with specified degree string value.

Parameters:
value - The value (String) parameter.
Throws:
java.lang.NumberFormatException - Number Format Exception.
See Also:
Degree(int), Degree(int,int,int), parseBillionDegree(String), parseMetarDegree(String), parseNmeaDegree(String), getFixedDegree()

Degree

public Degree(int thousandSeconds)
Degree constructor with specified degree in billons of seconds.

Parameters:
thousandSeconds - degree in thousands of seconds
See Also:
Degree(String), Degree(int,int,int), parseBillionDegree(String), parseMetarDegree(String), parseNmeaDegree(String), getFixedDegree()

Degree

public Degree(int degrees,
              int minutes,
              int seconds)
Degree constructor with specified degree billons.

Parameters:
degrees - degree
minutes - The minutes (int) parameter.
seconds - The seconds (int) parameter.
See Also:
Degree(String), Degree(int), parseBillionDegree(String), parseMetarDegree(String), parseNmeaDegree(String), getFixedDegree()
Method Detail

parse

public static long parse(java.lang.String value)
                  throws java.lang.NumberFormatException
Parse with the specified value parameter and return the long result.

Parameters:
value - The value (String) parameter.
Returns:
Results of the parse (long) value.
Throws:
java.lang.NumberFormatException - Number Format Exception.

parseBillionDegree

public static int parseBillionDegree(java.lang.String value)
                              throws java.lang.NumberFormatException
Parse billion degree with the specified value parameter and return the int result.

Parameters:
value - The value (String) parameter.
Returns:
Results of the parse billion degree (int) value.
Throws:
java.lang.NumberFormatException - Number Format Exception.

parseMetarDegree

public static int parseMetarDegree(java.lang.String value)
                            throws java.lang.NumberFormatException
Parse metar degree with the specified value parameter and return the int result.

Parameters:
value - The value (String) parameter.
Returns:
Results of the parse metar degree (int) value.
Throws:
java.lang.NumberFormatException - Number Format Exception.

parseNmeaDegree

public static int parseNmeaDegree(java.lang.String value)
                           throws java.lang.NumberFormatException
Parse nmea degree with the specified value parameter and return the int result.

Parameters:
value - The value (String) parameter.
Returns:
Results of the parse nmea degree (int) value.
Throws:
java.lang.NumberFormatException - Number Format Exception.

toDegreeString

public static java.lang.String toDegreeString(int value,
                                              java.lang.String additions)
To degree string with the specified value and additions parameters and return the String result.

Parameters:
value - The value (int) parameter.
additions - The additions (String) parameter.
Returns:
Results of the to degree string (String) value.

toString

public static java.lang.String toString(int value)
Method toString.

Parameters:
value - The value (int) parameter.
Returns:
Results of the to string (String) value.
See Also:
toDegreeString(int,String), toString()

add

public java.lang.Number add(java.lang.Number value)
Description copied from class: Fraction
Perform the add method and return the Number result.

Specified by:
add in interface Numeric
Specified by:
add in class Fraction
Parameters:
value - The value (Number) parameter.
Returns:
Results of the add (Number) value.
See Also:
Numeric.add(Number)

divide

public java.lang.Number divide(java.lang.Number value)
Description copied from class: Fraction
Perform the divide method and return the Number result.

Specified by:
divide in interface Numeric
Specified by:
divide in class Fraction
Parameters:
value - The value (Number) parameter.
Returns:
Results of the divide (Number) value.
See Also:
Numeric.divide(Number)

doubleValue

public double doubleValue()
Specified by:
doubleValue in class java.lang.Number
Returns:
Results of the double value (double) value.
See Also:
Number.doubleValue(), floatValue(), intValue(), longValue()

equals

public boolean equals(java.lang.Object compare)
Overrides:
equals in class java.lang.Object
Parameters:
compare - The compare (Object) parameter.
Returns:
Results of the equals (boolean) value.
See Also:
Object.equals(Object)

floatValue

public float floatValue()
Specified by:
floatValue in class java.lang.Number
Returns:
Results of the float value (float) value.
See Also:
Number.floatValue(), doubleValue(), intValue(), longValue()

getFixedDegree

public int getFixedDegree()
Method getFixedDegree.

Returns:
int degrees in thousands of a second.

getThousandSeconds

public int getThousandSeconds()
Method getThousandSeconds.

Returns:
Results of the get thousand seconds (int) value.

intDenominator

public int intDenominator()
Description copied from class: Fraction
Perform the intDenominator method and return the int result.

Specified by:
intDenominator in class Fraction
Returns:
Results of the int denominator (int) value.
See Also:
Fraction.intDenominator(), longDenominator()

intNumerator

public int intNumerator()
Description copied from class: Fraction
Perform the intNumerator method and return the int result.

Specified by:
intNumerator in class Fraction
Returns:
Results of the int numerator (int) value.
See Also:
Fraction.intNumerator(), longNumerator()

intValue

public int intValue()
Specified by:
intValue in class java.lang.Number
Returns:
Results of the int value (int) value.
See Also:
Number.intValue(), doubleValue(), floatValue(), longValue()

longDenominator

public long longDenominator()
Description copied from class: Fraction
Perform the longDenominator method and return the long result.

Specified by:
longDenominator in class Fraction
Returns:
Results of the long denominator (long) value.
See Also:
Fraction.longDenominator(), intDenominator()

longNumerator

public long longNumerator()
Description copied from class: Fraction
Perform the longNumerator method and return the long result.

Specified by:
longNumerator in class Fraction
Returns:
Results of the long numerator (long) value.
See Also:
Fraction.longNumerator(), intNumerator()

longValue

public long longValue()
Specified by:
longValue in class java.lang.Number
Returns:
Results of the long value (long) value.
See Also:
Number.longValue(), doubleValue(), floatValue(), intValue()

multiply

public java.lang.Number multiply(java.lang.Number value)
Description copied from class: Fraction
Perform the multiply method and return the Number result.

Specified by:
multiply in interface Numeric
Specified by:
multiply in class Fraction
Parameters:
value - The value (Number) parameter.
Returns:
Results of the multiply (Number) value.
See Also:
Numeric.multiply(Number)

negate

public java.lang.Number negate()
Description copied from interface: Numeric
Negate and return the Number result.

Returns:
Results of the negate (Number) value.
See Also:
Numeric.negate()

reciprocal

public java.lang.Number reciprocal()
Description copied from interface: Numeric
Reciprocal and return the Number result.

Returns:
Results of the reciprocal (Number) value.
See Also:
Numeric.reciprocal()

subtract

public java.lang.Number subtract(java.lang.Number value)
Description copied from class: Fraction
Perform the subtract method and return the Number result.

Specified by:
subtract in interface Numeric
Specified by:
subtract in class Fraction
Parameters:
value - The value (Number) parameter.
Returns:
Results of the subtract (Number) value.
See Also:
Numeric.subtract(Number)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Results of the to string (String) value.
See Also:
Object.toString(), toDegreeString(int,String), toString(int)

1.0.0

Copyright (c) 1999, 2007 IBM