Interface Sequence<T extends Item>
-
- Type Parameters:
T- extends <Item>
- All Superinterfaces:
Iterable<T>
- All Known Subinterfaces:
NodeSequence,PropertySequence
- All Known Implementing Classes:
ItemSequence.NodeSequenceImpl,ItemSequence.PropertySequenceImpl
public interface Sequence<T extends Item> extends Iterable<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TgetItem(String key)Retrieve anItemfrom this sequence by itskey.booleanhasItem(String key)Determine whether this sequence contains a specifickey.Iterator<T>iterator()Iterator for theItems in this sequence.-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
iterator
Iterator<T> iterator()
Iterator for theItems in this sequence. The order of the items is implementation specific.- Specified by:
iteratorin interfaceIterable<T extends Item>- See Also:
Iterable.iterator()
-
getItem
T getItem(String key) throws AccessDeniedException, PathNotFoundException, ItemNotFoundException, 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:
ItemNotFoundExceptionRepositoryExceptionAccessDeniedExceptionPathNotFoundException
-
hasItem
boolean hasItem(String key) throws RepositoryException
Determine whether this sequence contains a specifickey.- Parameters:
key- Thekeyto look up.- Returns:
trueif this sequence containskey.Falseotherwise.- Throws:
RepositoryException
-
-