Type
- The type of a node which may have children or it is a leaf.public interface SortedTreeWalkerCallback<Type>
Files.walkFileTree(java.nio.file.Path, java.nio.file.FileVisitor)
callback interface.
but with a more universal approach and concept.Modifier and Type | Interface and Description |
---|---|
static class |
SortedTreeWalkerCallback.Counters
This class contains the number of files etc. for callback.
|
static class |
SortedTreeWalkerCallback.Result
It is similar
FileVisitResult . |
Modifier and Type | Field and Description |
---|---|
static SortedTreeWalkerCallback<java.lang.Object> |
callbackTemplate
Use this as template for anonymous implementation.
|
static java.lang.String |
sVersion
Version, history and license.
|
Modifier and Type | Method and Description |
---|---|
void |
finished(Type startNode,
SortedTreeWalkerCallback.Counters cnt)
Invoked after finishing the walking through.
|
SortedTreeWalkerCallback.Result |
finishedParentNode(Type parentNode,
SortedTreeWalkerCallback.Counters cnt)
Invoked on end of walking through a parent node.
|
SortedTreeWalkerCallback.Result |
offerLeafNode(Type leafNode,
java.lang.Object info)
Invoked for any node which has no children or which is not processed because the depth of walking through the tree is reached.
|
SortedTreeWalkerCallback.Result |
offerParentNode(Type parentNode)
Invoked on start on walking through a parent node which have children.
|
boolean |
shouldAborted()
Returns true if the tree walking should be terminated respectively aborted.
|
void |
start(Type startNode)
Invoked before start of a walk through the tree.
|
static final java.lang.String sVersion
FileRemoteCallback
.
static final SortedTreeWalkerCallback<java.lang.Object> callbackTemplate
void start(Type startNode)
SortedTreeWalkerCallback.Result offerParentNode(Type parentNode)
#offerLeafNode(Type)
is not invoked.parentNode
- SortedTreeWalkerCallback.Result finishedParentNode(Type parentNode, SortedTreeWalkerCallback.Counters cnt)
parentNode
- the node which was walked throughcnt
- If the SortedTreeWalkerCallback.Counters.nrofLeafss
== SortedTreeWalkerCallback.Counters.nrofLeafSelected
and SortedTreeWalkerCallback.Counters.nrofParents
== SortedTreeWalkerCallback.Counters.nrofParentSelected
then all children are selected.SortedTreeWalkerCallback.Result offerLeafNode(Type leafNode, java.lang.Object info)
#offerLeafNode(Object)
, only one of both is called for a node.
For example it is invoked for a sub directory only if the depth is reached and #offerParentNode(Type)
is not called.leafNode
- void finished(Type startNode, SortedTreeWalkerCallback.Counters cnt)
boolean shouldAborted()