|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.cf.taste.impl.common.LongPrimitiveArrayIterator
public final class LongPrimitiveArrayIterator
While long[] is an Iterable, it is not an Iterable<Long>. This adapter class addresses that.
Constructor Summary | |
---|---|
LongPrimitiveArrayIterator(long[] array)
Creates an over an entire array. |
Method Summary | |
---|---|
boolean |
hasNext()
|
java.lang.Long |
next()
|
long |
nextLong()
|
long |
peek()
|
void |
remove()
|
void |
skip(int n)
Skip the next n elements supplied by this Iterator . |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LongPrimitiveArrayIterator(long[] array)
Creates an over an entire array.
array
- array to iterate overMethod Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator<java.lang.Long>
public java.lang.Long next()
next
in interface java.util.Iterator<java.lang.Long>
public long nextLong()
nextLong
in interface LongPrimitiveIterator
long
in iterationpublic long peek()
peek
in interface LongPrimitiveIterator
long
in iteration without advancing iterationpublic void remove()
remove
in interface java.util.Iterator<java.lang.Long>
java.lang.UnsupportedOperationException
public void skip(int n)
SkippingIterator
Iterator
. If there are less than n elements remaining,
this skips all remaining elements in the Iterator
. This method has the same effect as calling
Iterator.next()
n times, except that it will never throw NoSuchElementException
.
skip
in interface SkippingIterator<java.lang.Long>
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |