Class PrincipalIteratorAdapter
- java.lang.Object
-
- org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
-
- org.apache.jackrabbit.core.security.principal.PrincipalIteratorAdapter
-
- All Implemented Interfaces:
Iterator
,RangeIterator
,PrincipalIterator
public class PrincipalIteratorAdapter extends RangeIteratorDecorator implements PrincipalIterator
PrincipalIteratorAdapter
...
-
-
Field Summary
Fields Modifier and Type Field Description static PrincipalIteratorAdapter
EMPTY
Static instance of an emptyPrincipalIterator
.
-
Constructor Summary
Constructors Constructor Description PrincipalIteratorAdapter(Collection<? extends Principal> collection)
Creates an iterator for the given collection ofPrincipal
s.PrincipalIteratorAdapter(Iterator<? extends Principal> iterator)
Creates an adapter for the givenIterator
of principals.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Methods inherited from interface javax.jcr.RangeIterator
getPosition, getSize, skip
-
-
-
-
Field Detail
-
EMPTY
public static final PrincipalIteratorAdapter EMPTY
Static instance of an emptyPrincipalIterator
.
-
-
Constructor Detail
-
PrincipalIteratorAdapter
public PrincipalIteratorAdapter(Iterator<? extends Principal> iterator)
Creates an adapter for the givenIterator
of principals.- Parameters:
iterator
- iterator ofPrincipal
s
-
PrincipalIteratorAdapter
public PrincipalIteratorAdapter(Collection<? extends Principal> collection)
Creates an iterator for the given collection ofPrincipal
s.- Parameters:
collection
- collection ofPrincipal
objects.
-
-
Method Detail
-
nextPrincipal
public Principal nextPrincipal() throws NoSuchElementException
Returns the next policy.- Specified by:
nextPrincipal
in interfacePrincipalIterator
- Returns:
- next policy.
- Throws:
NoSuchElementException
- if there is no next policy.
-
-