org.apache.jackrabbit.rmi.iterator
Class ArrayIterator

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

public class ArrayIterator
extends Object
implements 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(Object[] array)
          Creates an iterator for the given array of objects.
 
Method Summary
 long getPosition()
          
 long getSize()
          
 boolean hasNext()
          
 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(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 Iterator

next

public Object next()

Specified by:
next in interface Iterator

remove

public void remove()

Specified by:
remove in interface Iterator

skip

public void skip(long items)

Specified by:
skip in interface RangeIterator

getSize

public long getSize()

Specified by:
getSize in interface RangeIterator

getPosition

public long getPosition()

Specified by:
getPosition in interface RangeIterator


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