uavsim.datatypes
Class ArcNavigational.ArcNavigationalIterator

java.lang.Object
  extended by uavsim.datatypes.A_Arc.A_ArcIterator
      extended by uavsim.datatypes.ArcNavigational.ArcNavigationalIterator
Enclosing class:
ArcNavigational

public class ArcNavigational.ArcNavigationalIterator
extends A_Arc.A_ArcIterator

Defines the iterator over a navigational 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
ArcNavigational.ArcNavigationalIterator(AngleNavigational stepAngle, boolean isCounterclockwise, boolean isInclusive)
          Creates a navigational angle iterator.
 
Method Summary
 void resetToEnd()
          Sets the iterator to the end angle.
 void resetToStart()
          Sets the iterator to the start angle.
 AngleNavigational stepToNext()
          Moves to the next angle in the forward direction and returns it.
 AngleNavigational 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

ArcNavigational.ArcNavigationalIterator

public ArcNavigational.ArcNavigationalIterator(AngleNavigational stepAngle,
                                               boolean isCounterclockwise,
                                               boolean isInclusive)
Creates a navigational 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 AngleNavigational 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 AngleNavigational 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