Class PrincipalIteratorAdapter
- java.lang.Object
-
- org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
-
- org.apache.jackrabbit.oak.spi.security.principal.PrincipalIteratorAdapter
-
- All Implemented Interfaces:
java.util.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(java.util.Collection<? extends java.security.Principal> collection)
Creates an iterator for the given collection ofPrincipal
s.PrincipalIteratorAdapter(java.util.Iterator<? extends java.security.Principal> iterator)
Creates an adapter for the givenIterator
of principals.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.security.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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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(java.util.Iterator<? extends java.security.Principal> iterator)
Creates an adapter for the givenIterator
of principals.- Parameters:
iterator
- iterator ofPrincipal
s
-
PrincipalIteratorAdapter
public PrincipalIteratorAdapter(java.util.Collection<? extends java.security.Principal> collection)
Creates an iterator for the given collection ofPrincipal
s.- Parameters:
collection
- collection ofPrincipal
objects.
-
-
Method Detail
-
nextPrincipal
@NotNull public @NotNull java.security.Principal nextPrincipal()
Returns the next policy.- Specified by:
nextPrincipal
in interfacePrincipalIterator
- Returns:
- next policy.
-
-