Class PrincipalIteratorAdapter
- java.lang.Object
-
- org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
-
- org.apache.jackrabbit.oak.spi.security.principal.PrincipalIteratorAdapter
-
- All Implemented Interfaces:
Iterator
,RangeIterator
,PrincipalIterator
public class PrincipalIteratorAdapter extends RangeIteratorDecorator implements PrincipalIterator
Principal specificRangeIteratorAdapter
implementing thePrincipalIterator
interface.
-
-
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 @NotNull 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
@NotNull public @NotNull Principal nextPrincipal()
Returns the next policy.- Specified by:
nextPrincipal
in interfacePrincipalIterator
- Returns:
- next policy.
-
-