Class RandomVectorIterator
java.lang.Object
me.hsgamer.hscore.bukkit.block.iterator.AbstractVectorIterator
me.hsgamer.hscore.bukkit.block.iterator.BaseVectorIterator
me.hsgamer.hscore.bukkit.block.iterator.impl.RandomVectorIterator
- All Implemented Interfaces:
Iterator<org.bukkit.util.Vector>,VectorIterator
The
VectorIterator that iterates randomly-
Field Summary
Fields inherited from class me.hsgamer.hscore.bukkit.block.iterator.AbstractVectorIterator
box -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.util.VectorgetContinue(org.bukkit.util.Vector current) Get the nextVectorbooleanhasContinue(org.bukkit.util.Vector current) Check if there is a nextVectororg.bukkit.util.Vectorinitial()Get the initialVectorvoidreset()Reset the iteratorMethods inherited from class me.hsgamer.hscore.bukkit.block.iterator.BaseVectorIterator
getCurrent, hasNext, nextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, removeMethods inherited from interface me.hsgamer.hscore.bukkit.block.iterator.VectorIterator
nextLocation
-
Constructor Details
-
RandomVectorIterator
Create a newRandomVectorIterator- Parameters:
box- the box
-
-
Method Details
-
reset
public void reset()Description copied from interface:VectorIteratorReset the iterator- Specified by:
resetin interfaceVectorIterator- Overrides:
resetin classBaseVectorIterator
-
initial
public org.bukkit.util.Vector initial()Description copied from class:BaseVectorIteratorGet the initialVector- Specified by:
initialin classBaseVectorIterator- Returns:
- the initial vector
-
getContinue
public org.bukkit.util.Vector getContinue(org.bukkit.util.Vector current) throws NoSuchElementException Description copied from class:BaseVectorIteratorGet the nextVector- Specified by:
getContinuein classBaseVectorIterator- Parameters:
current- the current vector- Returns:
- the next vector
- Throws:
NoSuchElementException- if there is no next vector
-
hasContinue
public boolean hasContinue(org.bukkit.util.Vector current) Description copied from class:BaseVectorIteratorCheck if there is a nextVector- Specified by:
hasContinuein classBaseVectorIterator- Parameters:
current- the current vector- Returns:
- true if there is a next vector
-