info.magnolia.jcr.iterator
Class RangeIteratorImpl<T>

java.lang.Object
  extended by info.magnolia.jcr.iterator.RangeIteratorImpl<T>
Type Parameters:
T -
All Implemented Interfaces:
Iterator, javax.jcr.RangeIterator

public class RangeIteratorImpl<T>
extends Object
implements javax.jcr.RangeIterator

Intended as a base class when implementing JCR iterators, sub-classes need only implement the special next methods such as nextNode() for NodeIterator.

Version:
$Id$

Constructor Summary
RangeIteratorImpl(Collection<T> collection)
           
RangeIteratorImpl(Iterator<T> iterator, int size)
           
RangeIteratorImpl(javax.jcr.RangeIterator rangeIterator)
           
 
Method Summary
 long getPosition()
           
 long getSize()
           
 boolean hasNext()
           
 T next()
           
protected  T nextElement()
           
 void remove()
           
 void skip(long skipNum)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeIteratorImpl

public RangeIteratorImpl(Collection<T> collection)

RangeIteratorImpl

public RangeIteratorImpl(javax.jcr.RangeIterator rangeIterator)

RangeIteratorImpl

public RangeIteratorImpl(Iterator<T> iterator,
                         int size)
Method Detail

skip

public void skip(long skipNum)
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

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public T next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator

nextElement

protected T nextElement()


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.