Interface Sequence<T extends javax.jcr.Item>
-
- Type Parameters:
T- extends <Item>
- All Superinterfaces:
java.lang.Iterable<T>
- All Known Subinterfaces:
NodeSequence,PropertySequence
public interface Sequence<T extends javax.jcr.Item> extends java.lang.Iterable<T>Interface for accessing JCRItems sequentially through anIteratoror looking them up through akey.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TgetItem(java.lang.String key)Retrieve anItemfrom this sequence by itskey.booleanhasItem(java.lang.String key)Determine whether this sequence contains a specifickey.java.util.Iterator<T>iterator()Iterator for theItems in this sequence.
-
-
-
Method Detail
-
iterator
java.util.Iterator<T> iterator()
Iterator for theItems in this sequence. The order of the items is implementation specific.- Specified by:
iteratorin interfacejava.lang.Iterable<T extends javax.jcr.Item>- See Also:
Iterable.iterator()
-
getItem
T getItem(java.lang.String key) throws javax.jcr.AccessDeniedException, javax.jcr.PathNotFoundException, javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
Retrieve anItemfrom this sequence by itskey. If the sequence does not contain thekeythis method throws anItemNotFoundException.- Parameters:
key- Thekeyof the item to retrieve. Must not benull.- Returns:
- The item belonging to
key. - Throws:
javax.jcr.ItemNotFoundExceptionjavax.jcr.RepositoryExceptionjavax.jcr.AccessDeniedExceptionjavax.jcr.PathNotFoundException
-
hasItem
boolean hasItem(java.lang.String key) throws javax.jcr.RepositoryExceptionDetermine whether this sequence contains a specifickey.- Parameters:
key- Thekeyto look up.- Returns:
trueif this sequence containskey.Falseotherwise.- Throws:
javax.jcr.RepositoryException
-
-