Class NodeTypeIteratorAdapter
- java.lang.Object
-
- org.apache.jackrabbit.commons.iterator.RangeIteratorDecorator
-
- org.apache.jackrabbit.commons.iterator.NodeTypeIteratorAdapter
-
- All Implemented Interfaces:
Iterator,NodeTypeIterator,RangeIterator
public class NodeTypeIteratorAdapter extends RangeIteratorDecorator implements NodeTypeIterator
-
-
Field Summary
Fields Modifier and Type Field Description static NodeTypeIteratorEMPTYStatic instance of an emptyNodeTypeIterator.
-
Constructor Summary
Constructors Constructor Description NodeTypeIteratorAdapter(Collection<NodeType> collection)Creates an iterator for the given collection.NodeTypeIteratorAdapter(Iterator iterator)Creates an adapter for the givenIterator.NodeTypeIteratorAdapter(RangeIterator iterator)Creates an adapter for the givenRangeIterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeTypenextNodeType()Returns the next node type.-
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 NodeTypeIterator EMPTY
Static instance of an emptyNodeTypeIterator.
-
-
Constructor Detail
-
NodeTypeIteratorAdapter
public NodeTypeIteratorAdapter(RangeIterator iterator)
Creates an adapter for the givenRangeIterator.- Parameters:
iterator- iterator ofNodeTypes
-
NodeTypeIteratorAdapter
public NodeTypeIteratorAdapter(Iterator iterator)
Creates an adapter for the givenIterator.- Parameters:
iterator- iterator ofNodeTypes
-
NodeTypeIteratorAdapter
public NodeTypeIteratorAdapter(Collection<NodeType> collection)
Creates an iterator for the given collection.- Parameters:
collection- collection ofNodeTypes
-
-
Method Detail
-
nextNodeType
public NodeType nextNodeType() throws NoSuchElementException
Returns the next node type.- Specified by:
nextNodeTypein interfaceNodeTypeIterator- Returns:
- next node type
- Throws:
NoSuchElementException- if there is no next node type
-
-