TypeNode
- The type of a node which may have children or it is a leaf.TypeStartInfo
- this is a specific type of data which describes the condition of walkingpublic interface SortedTreeWalkerCallback<TypeNode,TypeStartInfo>
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.Result
It is similar
FileVisitResult . |
Modifier and Type | Field and Description |
---|---|
static SortedTreeWalkerCallback<java.lang.Object,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(TypeNode startNode)
Invoked after finishing the walking through.
|
SortedTreeWalkerCallback.Result |
finishedParentNode(TypeNode parentNode,
java.lang.Object data,
java.lang.Object oWalkInfo)
Invoked on end of walking through a parent node.
|
SortedTreeWalkerCallback.Result |
offerLeafNode(TypeNode leafNode,
java.lang.Object leafNodeData)
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(TypeNode parentNode,
java.lang.Object data,
java.lang.Object oWalkInfo)
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(TypeNode startNode,
TypeStartInfo startInfo)
Invoked before start of a walk through the tree.
|
static final java.lang.String sVersion
offerLeafNode(Object, Object)
etc.
It is used for FileRemoteWalkerCallback
to inform about the implementation data java.nio.file.Path
FileRemoteWalkerCallback
.
static final SortedTreeWalkerCallback<java.lang.Object,java.lang.Object> callbackTemplate
void start(TypeNode startNode, TypeStartInfo startInfo)
SortedTreeWalkerCallback.Result offerParentNode(TypeNode parentNode, java.lang.Object data, java.lang.Object oWalkInfo)
#offerLeafNode(TypeNode)
is not invoked.parentNode
- data
- Specific data presentation of the nodeoWalkInfo
- internal possible information about walking, depending on usage.SortedTreeWalkerCallback.Result finishedParentNode(TypeNode parentNode, java.lang.Object data, java.lang.Object oWalkInfo)
parentNode
- the node which was walked throughdata
- Specific data presentation of the nodeoWalkInfo
- internal possible information about walking, depending on usage.SortedTreeWalkerCallback.Result offerLeafNode(TypeNode leafNode, java.lang.Object leafNodeData)
#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(TypeNode)
is not called.leafNode
- data
- Specific data presentation of the nodevoid finished(TypeNode startNode)
boolean shouldAborted()