Class WrappedPositionIterator<T>

java.lang.Object
me.hsgamer.hscore.minecraft.block.adapt.WrappedPositionIterator<T>
Type Parameters:
T - the type
All Implemented Interfaces:
Iterator<T>
Direct Known Subclasses:
LocationIterator, VectorIterator

public abstract class WrappedPositionIterator<T> extends Object implements Iterator<T>
The PositionIterator for any type
  • Constructor Details

    • WrappedPositionIterator

      protected WrappedPositionIterator(PositionIterator positionIterator)
      Create a new iterator
      Parameters:
      positionIterator - the position iterator
  • Method Details

    • convert

      protected abstract T convert(Position position)
      Convert the position to the type
      Parameters:
      position - the position
      Returns:
      the type
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public T next()
      Specified by:
      next in interface Iterator<T>
    • reset

      public void reset()
      Reset the iterator