|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.rmi.remote.ArrayIterator
public class ArrayIterator
A simple array-based remote iterator. Used when the iteration is short enough for all the elements to be sent over the network in one go.
Constructor Summary | |
---|---|
ArrayIterator(java.lang.Object[] elements)
Creates an array-based remote iterator from the given array of remote references or serializable objects. |
Method Summary | |
---|---|
long |
getSize()
Returns the size of the iterator. |
java.lang.Object[] |
nextObjects()
Returns the underlying array. |
void |
skip(long items)
Skips the first items elements in the array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArrayIterator(java.lang.Object[] elements)
elements
- elements of the iterationMethod Detail |
---|
public long getSize()
getSize
in interface RemoteIterator
RemoteIterator.getSize()
public void skip(long items) throws java.lang.IllegalArgumentException, java.util.NoSuchElementException
items
elements in the array.
Skips the given number of elements in this iteration.
skip
in interface RemoteIterator
items
- number of elements to skip
java.util.NoSuchElementException
- if skipped past the last element
java.lang.IllegalArgumentException
RangeIterator.skip(long)
public java.lang.Object[] nextObjects() throws java.lang.IllegalArgumentException
null
if the end of this iteration has
been reached.
To reduce the amount of remote method calls, this method returns an array of one or more elements in this iteration.
nextObjects
in interface RemoteIterator
null
java.lang.IllegalArgumentException
- if maxItems
is not positiveIterator.next()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |