org.apache.jackrabbit.commons.iterator
Class AccessControlPolicyIteratorAdapter

java.lang.Object
  extended by org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
      extended by org.apache.jackrabbit.commons.iterator.AccessControlPolicyIteratorAdapter
All Implemented Interfaces:
Iterator, RangeIterator, AccessControlPolicyIterator

public class AccessControlPolicyIteratorAdapter
extends RangeIteratorDecorator
implements AccessControlPolicyIterator

Adapter class for turning RangeIterators or Iterators into AccessControlPolicyIteratorAdapters.


Field Summary
static AccessControlPolicyIterator EMPTY
          Static instance of an empty AccessControlPolicyIteratorAdapter.
 
Constructor Summary
AccessControlPolicyIteratorAdapter(Collection collection)
          Creates an iterator for the given collection.
AccessControlPolicyIteratorAdapter(Iterator iterator)
          Creates an adapter for the given Iterator.
AccessControlPolicyIteratorAdapter(RangeIterator iterator)
          Creates an adapter for the given RangeIterator.
 
Method Summary
 AccessControlPolicy nextAccessControlPolicy()
          Returns the next policy.
 
Methods inherited from class org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
getPosition, getSize, hasNext, next, remove, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jcr.RangeIterator
getPosition, getSize, skip
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Field Detail

EMPTY

public static final AccessControlPolicyIterator EMPTY
Static instance of an empty AccessControlPolicyIteratorAdapter.

Constructor Detail

AccessControlPolicyIteratorAdapter

public AccessControlPolicyIteratorAdapter(RangeIterator iterator)
Creates an adapter for the given RangeIterator.

Parameters:
iterator - iterator of access control policies.

AccessControlPolicyIteratorAdapter

public AccessControlPolicyIteratorAdapter(Iterator iterator)
Creates an adapter for the given Iterator.

Parameters:
iterator - iterator of access control policies.

AccessControlPolicyIteratorAdapter

public AccessControlPolicyIteratorAdapter(Collection collection)
Creates an iterator for the given collection.

Parameters:
collection - collection of AccessControlPolicy objects.
Method Detail

nextAccessControlPolicy

public AccessControlPolicy nextAccessControlPolicy()
                                            throws NoSuchElementException
Returns the next policy.

Specified by:
nextAccessControlPolicy in interface AccessControlPolicyIterator
Returns:
next policy.
Throws:
NoSuchElementException - if there is no next policy.


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