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
-
Method Summary
Modifier and TypeMethodDescriptionabstract Position
getContinue
(Position current) Get the nextPosition
Get the currentPosition
abstract boolean
hasContinue
(Position current) Check if there is a nextPosition
boolean
hasNext()
abstract Position
initial()
Get the initialPosition
next()
void
reset()
Reset the iteratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:PositionIterator
Reset the iterator -
hasNext
public boolean hasNext() -
next
-