Class PathParentIterator
java.lang.Object
org.apache.zookeeper.server.watch.PathParentIterator
-
Method Summary
Modifier and TypeMethodDescriptionReturn an Iterable view so that this Iterator can be used in for each statements.booleanReturns true if this iterator is currently at a parent path as opposed to the initial path given to the constructorstatic PathParentIteratorReturn a new PathParentIterator that iterates from the given path to all parents.static PathParentIteratorforPathOnly(String path) Return a new PathParentIterator that only returns the given path - i.e.booleanhasNext()next()voidremove()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining
-
Method Details
-
forAll
Return a new PathParentIterator that iterates from the given path to all parents.- Parameters:
path- initial path
-
forPathOnly
Return a new PathParentIterator that only returns the given path - i.e. does not iterate to parent paths.- Parameters:
path- initial path
-
asIterable
-
hasNext
-
atParentPath
public boolean atParentPath()Returns true if this iterator is currently at a parent path as opposed to the initial path given to the constructor- Returns:
- true/false
-
next
-
remove
-