org.apache.jackrabbit.rmi.iterator
Class ArrayIterator

java.lang.Object
  extended by org.apache.jackrabbit.rmi.iterator.ArrayIterator
All Implemented Interfaces:
java.util.Iterator, javax.jcr.RangeIterator
Direct Known Subclasses:
ArrayEventIterator, ArrayEventListenerIterator

public class ArrayIterator
extends java.lang.Object
implements javax.jcr.RangeIterator

Array implementation of the JCR RangeIterator interface. This class implements the RangeIterator functionality for an underlying array of objects. Used as the base class for the type-specific iterator classes defined in this package.


Constructor Summary
ArrayIterator(java.lang.Object[] array)
          Creates an iterator for the given array of objects.
 
Method Summary
 long getPosition()
          
 long getSize()
          
 boolean hasNext()
          
 java.lang.Object next()
          
 void remove()
          
 void skip(long items)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayIterator

public ArrayIterator(java.lang.Object[] array)
Creates an iterator for the given array of objects.

Parameters:
array - the objects to iterate
Method Detail

hasNext

public boolean hasNext()

Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()

Specified by:
next in interface java.util.Iterator

remove

public void remove()

Specified by:
remove in interface java.util.Iterator

skip

public void skip(long items)

Specified by:
skip in interface javax.jcr.RangeIterator

getSize

public long getSize()

Specified by:
getSize in interface javax.jcr.RangeIterator

getPosition

public long getPosition()

Specified by:
getPosition in interface javax.jcr.RangeIterator


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.