Class ForwardLineOfOwnTroops.PositionIterator

  • All Implemented Interfaces:
    java.util.Iterator<Position>
    Enclosing class:
    ForwardLineOfOwnTroops

    protected static class ForwardLineOfOwnTroops.PositionIterator
    extends java.lang.Object
    implements java.util.Iterator<Position>
    Iterator to generate equally spaced positions along a control line.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PositionIterator​(java.lang.Iterable<? extends Position> positions, double interval, Globe globe)
      Create a new iterator to compute the positions of a triangle wave.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      Position next()
      void remove()
      Not supported.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Field Detail

      • positions

        protected java.util.Iterator<? extends Position> positions
        Control positions.
      • interval

        protected Angle interval
        Wavelength, as a geographic angle.
      • tolerance

        protected double tolerance
      • thisPosition

        protected Position thisPosition
        Current position.
      • nextControlPosition

        protected Position nextControlPosition
        Position of the next control point.
    • Constructor Detail

      • PositionIterator

        protected PositionIterator​(java.lang.Iterable<? extends Position> positions,
                                   double interval,
                                   Globe globe)
        Create a new iterator to compute the positions of a triangle wave.
        Parameters:
        positions - Control positions for the triangle wave line.
        interval - Generate positions along the control line at this interval.
        globe - Globe used to compute geographic positions.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<Position>
      • next

        public Position next()
        Specified by:
        next in interface java.util.Iterator<Position>
      • remove

        public void remove()
        Not supported.
        Specified by:
        remove in interface java.util.Iterator<Position>