org.apache.jackrabbit.core.security.principal
Class PrincipalIteratorAdapter

java.lang.Object
  extended by org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
      extended by org.apache.jackrabbit.core.security.principal.PrincipalIteratorAdapter
All Implemented Interfaces:
Iterator, RangeIterator, PrincipalIterator

public class PrincipalIteratorAdapter
extends RangeIteratorDecorator
implements PrincipalIterator

PrincipalIteratorAdapter...


Field Summary
static PrincipalIteratorAdapter EMPTY
          Static instance of an empty PrincipalIterator.
 
Constructor Summary
PrincipalIteratorAdapter(Collection<? extends Principal> collection)
          Creates an iterator for the given collection of Principals.
PrincipalIteratorAdapter(Iterator<? extends Principal> iterator)
          Creates an adapter for the given Iterator of principals.
 
Method Summary
 Principal nextPrincipal()
          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 PrincipalIteratorAdapter EMPTY
Static instance of an empty PrincipalIterator.

Constructor Detail

PrincipalIteratorAdapter

public PrincipalIteratorAdapter(Iterator<? extends Principal> iterator)
Creates an adapter for the given Iterator of principals.

Parameters:
iterator - iterator of Principals

PrincipalIteratorAdapter

public PrincipalIteratorAdapter(Collection<? extends Principal> collection)
Creates an iterator for the given collection of Principals.

Parameters:
collection - collection of Principal objects.
Method Detail

nextPrincipal

public Principal nextPrincipal()
                        throws NoSuchElementException
Returns the next policy.

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


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