diff options
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcdata/bst/DirectedWalkFunction.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/funcdata/bst/DirectedWalkFunction.java | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/funcdata/bst/DirectedWalkFunction.java b/BJC-Utils2/src/main/java/bjc/utils/funcdata/bst/DirectedWalkFunction.java index 18e80be..12c87b3 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/funcdata/bst/DirectedWalkFunction.java +++ b/BJC-Utils2/src/main/java/bjc/utils/funcdata/bst/DirectedWalkFunction.java @@ -2,9 +2,11 @@ package bjc.utils.funcdata.bst; /** * Represents a function for doing a directed walk of a binary tree. + * * @author ben * * @param <T> + * The type of element stored in the walked tree */ @FunctionalInterface public interface DirectedWalkFunction<T> { @@ -16,27 +18,30 @@ public interface DirectedWalkFunction<T> { */ public enum DirectedWalkResult { /** - * Specifies that the function has succesfully completed - * - */ - SUCCESS, - /** * Specifies that the function has failed. */ FAILURE, - /** + /** * Specifies that the function wants to move left in the tree next. */ - LEFT, + LEFT, /** - * Specifies that the function wants to move right in the tree next. + * Specifies that the function wants to move right in the tree + * next. */ - RIGHT + RIGHT, + /** + * Specifies that the function has succesfully completed + * + */ + SUCCESS } /** * Perform a directed walk on a node of a tree. - * @param data The data stored in the node currently being visited + * + * @param data + * The data stored in the node currently being visited * @return The way the function wants the walk to go next. */ public DirectedWalkResult walk(T data); |
