Interface TraverseAndLeafsHandler<I,O,L>

Type Parameters:
I - type of current depth items to iterate over.
O - type of the deeper depth items to iterate over.
L - type of the leaf object.
All Superinterfaces:
TraverseHandler<I,O>
All Known Implementing Classes:
DslAttrHandler, DsParamHandler

public interface TraverseAndLeafsHandler<I,O,L> extends TraverseHandler<I,O>
Describes paths to iterate over and explains how to construct leaf. Make possible to iterate over tree of different types of objects.
  • Method Details

    • backToPreviousParent

      @Nonnull TraverseAndLeafsHandler<?,I,L> backToPreviousParent()
      Description copied from interface: TraverseHandler
      Invoked when iteration goes upper to parents in a tree hierarchy.
      Specified by:
      backToPreviousParent in interface TraverseHandler<I,O>
      Returns:
      handler of previous depth.
    • forwardToNewParent

      @Nonnull TraverseAndLeafsHandler<O,?,L> forwardToNewParent(@Nonnull I parent)
      Description copied from interface: TraverseHandler
      Invoked when iteration goes deeper to children which becomes new parent in a tree hierarchy.
      Specified by:
      forwardToNewParent in interface TraverseHandler<I,O>
      Returns:
      handler of deeper depth level.
    • constructLeaf

      @Nullable L constructLeaf(@Nonnull I leaf)
      May return null if leaf should be filtered.
      Parameters:
      leaf - leaf.
      Returns:
      leaf object.