DATATYPE - The type of object to be iterated.public interface IHierarchyVisitorCallback<DATATYPE> extends ICallback
| Modifier and Type | Method and Description |
|---|---|
default void |
begin()
Called before the tree walking starts.
|
default void |
end()
Called after the tree walking ended.
|
int |
getLevel() |
EHierarchyVisitorReturn |
onItemAfterChildren(DATATYPE aItem)
Called after eventual children of the current item were visited.
|
EHierarchyVisitorReturn |
onItemBeforeChildren(DATATYPE aItem)
Called before children of the current item are visited.
|
default void |
onLevelDown()
Called before the tree walker descends into the next tree level.
|
default void |
onLevelUp()
Called after the tree walker ascends into the previous tree level.
|
default void begin()
@Nonnegative int getLevel()
default void onLevelDown()
getLevel() should return a value increased by 1.default void onLevelUp()
getLevel() should return a value decreased by 1.@Nonnull EHierarchyVisitorReturn onItemBeforeChildren(DATATYPE aItem)
aItem - The current item. May be null.null status code that determines how to continue
iteration.@Nonnull EHierarchyVisitorReturn onItemAfterChildren(DATATYPE aItem)
onItemBeforeChildren(Object) was
called.aItem - The current item. May be null.null status code that determines how to continue
iteration.default void end()
Copyright © 2014–2020 Philip Helger. All rights reserved.