Class BasePositionIterator
java.lang.Object
me.hsgamer.hscore.minecraft.block.iterator.AbstractPositionIterator
me.hsgamer.hscore.minecraft.block.iterator.BasePositionIterator
- All Implemented Interfaces:
Iterator<Position>,PositionIterator
- Direct Known Subclasses:
LinearPositionIterator,RandomPositionIterator
The base
PositionIterator for BlockBox-
Field Summary
Fields inherited from class me.hsgamer.hscore.minecraft.block.iterator.AbstractPositionIterator
box -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract PositiongetContinue(Position current) Get the nextPositionGet the currentPositionabstract booleanhasContinue(Position current) Check if there is a nextPositionbooleanhasNext()abstract Positioninitial()Get the initialPositionnext()voidreset()Reset the iteratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
BasePositionIterator
Create a newBasePositionIterator- Parameters:
box- the box
-
-
Method Details
-
getCurrent
Get the currentPosition- Returns:
- the current position
-
initial
Get the initialPosition- Returns:
- the initial position
-
getContinue
Get the nextPosition- Parameters:
current- the current position- Returns:
- the next position
- Throws:
NoSuchElementException- if there is no next position
-
hasContinue
Check if there is a nextPosition- Parameters:
current- the current position- Returns:
- true if there is a next position
-
reset
public void reset()Description copied from interface:PositionIteratorReset the iterator -
hasNext
public boolean hasNext() -
next
-