Interface Sequence<T extends Item>
-
- Type Parameters:
T
- extends <Item>
- All Superinterfaces:
java.lang.Iterable<T>
- All Known Subinterfaces:
NodeSequence
,PropertySequence
public interface Sequence<T extends Item> extends java.lang.Iterable<T>
Interface for accessing JCRItem
s sequentially through anIterator
or looking them up through akey
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
getItem(java.lang.String key)
Retrieve anItem
from this sequence by itskey
.boolean
hasItem(java.lang.String key)
Determine whether this sequence contains a specifickey
.java.util.Iterator<T>
iterator()
Iterator for theItem
s in this sequence.
-
-
-
Method Detail
-
iterator
java.util.Iterator<T> iterator()
Iterator for theItem
s in this sequence. The order of the items is implementation specific.
-
getItem
T getItem(java.lang.String key) throws AccessDeniedException, PathNotFoundException, ItemNotFoundException, RepositoryException
Retrieve anItem
from this sequence by itskey
. If the sequence does not contain thekey
this method throws anItemNotFoundException
.- Parameters:
key
- Thekey
of the item to retrieve. Must not benull
.- Returns:
- The item belonging to
key
. - Throws:
ItemNotFoundException
RepositoryException
AccessDeniedException
PathNotFoundException
-
hasItem
boolean hasItem(java.lang.String key) throws RepositoryException
Determine whether this sequence contains a specifickey
.- Parameters:
key
- Thekey
to look up.- Returns:
true
if this sequence containskey
.False
otherwise.- Throws:
RepositoryException
-
-