Class PathParentIterator
- java.lang.Object
- 
- org.apache.zookeeper.server.watch.PathParentIterator
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<String>asIterable()Return an Iterable view so that this Iterator can be used in for each statements.booleanatParentPath()Returns true if this iterator is currently at a parent path as opposed to the initial path given to the constructorstatic PathParentIteratorforAll(String path)Return 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()Stringnext()voidremove()- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.util.IteratorforEachRemaining
 
- 
 
- 
- 
- 
Method Detail- 
forAllpublic static PathParentIterator forAll(String path) Return a new PathParentIterator that iterates from the given path to all parents.- Parameters:
- path- initial path
 
 - 
forPathOnlypublic static PathParentIterator forPathOnly(String path) Return a new PathParentIterator that only returns the given path - i.e. does not iterate to parent paths.- Parameters:
- path- initial path
 
 - 
asIterablepublic Iterable<String> asIterable() Return an Iterable view so that this Iterator can be used in for each statements. IMPORTANT: the returned Iterable is single use only- Returns:
- Iterable
 
 - 
atParentPathpublic 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
 
 
- 
 
-