|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.lang.XShortArrayIterator
public class XShortArrayIterator
An XShortIterator
that wraps a short array.
Constructor Summary | |
---|---|
XShortArrayIterator(short[] array)
Constructs a new array iterator. |
|
XShortArrayIterator(short[] array,
int offset,
int length)
Constructs a new array iterator. |
Method Summary | |
---|---|
short[] |
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). |
short |
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. |
XShortIterator |
toFirst()
Resets the iterator to the beginning. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XShortArrayIterator(short[] array)
array
- The array to iterate.public XShortArrayIterator(short[] 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.Method Detail |
---|
public final short[] array()
public final int offset()
public final int length()
public final boolean hasNext()
XShortIterator
hasNext
in interface XShortIterator
public final short next()
XShortIterator
next
in interface XShortIterator
public final void remove()
remove
in interface XShortIterator
UnsupportedOperationException
- If called.public final XShortIterator toFirst()
XShortIterator
toFirst
in interface XShortIterator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |