public class XFloatArrayIterator extends Object implements XFloatIterator
XFloatIterator that wraps a float array.| Constructor and Description |
|---|
XFloatArrayIterator(float[] array)
Constructs a new array iterator.
|
XFloatArrayIterator(float[] array,
int offset,
int length)
Constructs a new array iterator.
|
| Modifier and Type | Method and Description |
|---|---|
float[] |
array()
The array backing this iterator.
|
boolean |
hasNext()
Returns true if the iteration has more elements.
|
int |
length()
Gets the length of the iterator (the number of elements it returns
starting with the offset).
|
float |
next()
Returns the next element in the iteration.
|
int |
offset()
Gets the offset into the backing array at which this
iterator starts.
|
void |
remove()
Remove is not supported for array iterators.
|
XFloatIterator |
toFirst()
Resets the iterator to the beginning.
|
public XFloatArrayIterator(float[] array)
array - The array to iterate.public XFloatArrayIterator(float[] array,
int offset,
int length)
array - The backing array.offset - The offset into the array.length - The length the number of elements including the offset to iterate.public final float[] array()
public final int offset()
public final int length()
public final boolean hasNext()
XFloatIteratorhasNext in interface XFloatIteratorpublic final float next()
XFloatIteratornext in interface XFloatIteratorpublic final void remove()
remove in interface XFloatIteratorUnsupportedOperationException - If called.public final XFloatIterator toFirst()
XFloatIteratortoFirst in interface XFloatIteratorCopyright © 2019 Neeve Research, LLC. All Rights Reserved.