Class RandomPositionIterator
java.lang.Object
me.hsgamer.hscore.minecraft.block.iterator.AbstractPositionIterator
me.hsgamer.hscore.minecraft.block.iterator.BasePositionIterator
me.hsgamer.hscore.minecraft.block.impl.iterator.RandomPositionIterator
- All Implemented Interfaces:
Iterator<Position>
,PositionIterator
The
PositionIterator
that iterates randomly-
Field Summary
Fields inherited from class me.hsgamer.hscore.minecraft.block.iterator.AbstractPositionIterator
box
-
Constructor Summary
-
Method Summary
Methods inherited from class me.hsgamer.hscore.minecraft.block.iterator.BasePositionIterator
getCurrent, hasNext, next
Methods 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
-
RandomPositionIterator
Create a newRandomPositionIterator
- Parameters:
box
- the box
-
-
Method Details
-
reset
public void reset()Description copied from interface:PositionIterator
Reset the iterator- Specified by:
reset
in interfacePositionIterator
- Overrides:
reset
in classBasePositionIterator
-
initial
Description copied from class:BasePositionIterator
Get the initialPosition
- Specified by:
initial
in classBasePositionIterator
- Returns:
- the initial position
-
getContinue
Description copied from class:BasePositionIterator
Get the nextPosition
- Specified by:
getContinue
in classBasePositionIterator
- Parameters:
current
- the current position- Returns:
- the next position
- Throws:
NoSuchElementException
- if there is no next position
-
hasContinue
Description copied from class:BasePositionIterator
Check if there is a nextPosition
- Specified by:
hasContinue
in classBasePositionIterator
- Parameters:
current
- the current position- Returns:
- true if there is a next position
-