uavsim.datatypes
Class DegreesPerSecond

java.lang.Object
  extended by uavsim.datatypes.DegreesPerSecond
All Implemented Interfaces:
java.lang.Comparable<DegreesPerSecond>, I_Unitable<DegreesPerSecond>

public class DegreesPerSecond
extends java.lang.Object
implements I_Unitable<DegreesPerSecond>

Defines a rate of change in degrees per second.

Author:
Dan Tappan [05.07.11]

Field Summary
private  double _degreesPerSecond
          the rate
 
Constructor Summary
DegreesPerSecond()
          Creates a rate object at 0 degrees per second.
DegreesPerSecond(double degreesPerSecond)
          Creates a rate object.
 
Method Summary
 DegreesPerSecond add_(DegreesPerSecond degreesPerSecond)
          Adds another unit to this one.
 int compareTo(DegreesPerSecond degreesPerSecond)
          
 double getValue_()
          Returns the numerical value of this unit.
private  void setDegreesPerSecond(double degreesPerSecond)
          Sets the rate
 DegreesPerSecond subtract_(DegreesPerSecond time)
          Subtract another unit from this one.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_degreesPerSecond

private double _degreesPerSecond
the rate

Constructor Detail

DegreesPerSecond

public DegreesPerSecond()
Creates a rate object at 0 degrees per second.


DegreesPerSecond

public DegreesPerSecond(double degreesPerSecond)
Creates a rate object.

Parameters:
degreesPerSecond - - the rate; a negative value is ok
Method Detail

add_

public DegreesPerSecond add_(DegreesPerSecond degreesPerSecond)
Adds another unit to this one.

Specified by:
add_ in interface I_Unitable<DegreesPerSecond>
Parameters:
degreesPerSecond - - the unit
Returns:
the result as a new unit

compareTo

public int compareTo(DegreesPerSecond degreesPerSecond)

Specified by:
compareTo in interface java.lang.Comparable<DegreesPerSecond>

getValue_

public double getValue_()
Returns the numerical value of this unit.

Specified by:
getValue_ in interface I_Unitable<DegreesPerSecond>
Returns:
the value

setDegreesPerSecond

private void setDegreesPerSecond(double degreesPerSecond)
Sets the rate

Parameters:
degreesPerSecond - - the rate; a negative value is ok

subtract_

public DegreesPerSecond subtract_(DegreesPerSecond time)
Subtract another unit from this one. A negative result is illegal. xxx why?

Specified by:
subtract_ in interface I_Unitable<DegreesPerSecond>
Parameters:
time - - the unit
Returns:
the result as a new unit

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object