uavsim.datatypes
Class ArcMathematical.ArcMathematicalIterator

java.lang.Object
  extended by uavsim.datatypes.A_Arc.A_ArcIterator
      extended by uavsim.datatypes.ArcMathematical.ArcMathematicalIterator
Enclosing class:
ArcMathematical

public class ArcMathematical.ArcMathematicalIterator
extends A_Arc.A_ArcIterator

Defines the iterator over a mathematical arc.

Author:
Dan Tappan [24.06.11]

Field Summary
 
Fields inherited from class uavsim.datatypes.A_Arc.A_ArcIterator
_currentAngle, _isCounterclockwise, _isInclusive, _stepAngle, _stepCount, _stepIndex
 
Constructor Summary
ArcMathematical.ArcMathematicalIterator(AngleMathematical stepAngle, boolean isCounterclockwise, boolean isInclusive)
          Creates a mathematical angle iterator.
 
Method Summary
 void resetToEnd()
          Sets the iterator to the end angle.
 void resetToStart()
          Sets the iterator to the start angle.
 AngleMathematical stepToNext()
          Moves to the next angle in the forward direction and returns it.
 AngleMathematical stepToPrevious()
          Moves to the next angle in the backward direction and returns it.
 
Methods inherited from class uavsim.datatypes.A_Arc.A_ArcIterator
getStepAngle, hasNext, hasPrevious, isCounterclockwise, isInclusive, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArcMathematical.ArcMathematicalIterator

public ArcMathematical.ArcMathematicalIterator(AngleMathematical stepAngle,
                                               boolean isCounterclockwise,
                                               boolean isInclusive)
Creates a mathematical angle iterator.

Parameters:
stepAngle - - the angle to move for each step
isCounterclockwise - - whether to step counterclockwise
isInclusive - - whether to include the end angle
Method Detail

resetToEnd

public void resetToEnd()
Sets the iterator to the end angle.

Overrides:
resetToEnd in class A_Arc.A_ArcIterator

resetToStart

public void resetToStart()
Sets the iterator to the start angle.

Overrides:
resetToStart in class A_Arc.A_ArcIterator

stepToNext

public AngleMathematical stepToNext()
Moves to the next angle in the forward direction and returns it. The concept of "next" depends on the step direction.

Overrides:
stepToNext in class A_Arc.A_ArcIterator
Returns:
the angle

stepToPrevious

public AngleMathematical stepToPrevious()
Moves to the next angle in the backward direction and returns it. The concept of "previous" depends on the step direction.

Overrides:
stepToPrevious in class A_Arc.A_ArcIterator
Returns:
the angle