Class LinearVectorIterator
java.lang.Object
me.hsgamer.hscore.bukkit.block.iterator.AbstractVectorIterator
me.hsgamer.hscore.bukkit.block.iterator.BaseVectorIterator
me.hsgamer.hscore.bukkit.block.iterator.impl.LinearVectorIterator
- All Implemented Interfaces:
Iterator<org.bukkit.util.Vector>,VectorIterator
The
VectorIterator that iterates in a linear way-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe linear subject -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LinearVectorIterator.LinearCoordinateA linear subject for the x-axisstatic final LinearVectorIterator.LinearCoordinateA linear subject for the y-axisstatic final LinearVectorIterator.LinearCoordinateA linear subject for the z-axisFields inherited from class me.hsgamer.hscore.bukkit.block.iterator.AbstractVectorIterator
box -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new iteratorLinearVectorIterator(BlockBox box, LinearVectorIterator.LinearCoordinate... coordinates) Create a new iterator -
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 initialVectorMethods inherited from class me.hsgamer.hscore.bukkit.block.iterator.BaseVectorIterator
getCurrent, hasNext, next, resetMethods 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
-
Field Details
-
X_COORDINATE
A linear subject for the x-axis -
Y_COORDINATE
A linear subject for the y-axis -
Z_COORDINATE
A linear subject for the z-axis
-
-
Constructor Details
-
LinearVectorIterator
Create a new iterator- Parameters:
box- the boxcoordinates- the linear subjects
-
LinearVectorIterator
Create a new iterator- Parameters:
box- the box
-
-
Method Details
-
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
-