public class DocumentTreeIterator extends Object implements Iterator<DocumentModel>
The tree is traversed from top to bottom and left to right.
TODO: move this in an utility package
Constructor and Description |
---|
DocumentTreeIterator(CoreSession session,
DocumentModel root)
Creates the iterator given the tree root.
|
DocumentTreeIterator(CoreSession session,
DocumentModel root,
boolean excludeRoot) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
DocumentModel |
next() |
void |
remove() |
void |
reset()
Resets the iterator back to the tree root and clear any cached data.
|
public DocumentTreeIterator(CoreSession session, DocumentModel root) throws ClientException
ClientException
public DocumentTreeIterator(CoreSession session, DocumentModel root, boolean excludeRoot) throws ClientException
ClientException
public boolean hasNext()
hasNext
in interface Iterator<DocumentModel>
public DocumentModel next()
next
in interface Iterator<DocumentModel>
public void remove()
remove
in interface Iterator<DocumentModel>
public void reset()
Copyright © 2015 Nuxeo SA. All rights reserved.