Class ChildrenCollector

All Implemented Interfaces:
ItemVisitor

public class ChildrenCollector extends TraversingItemVisitor.Default
ChildrenCollector is a utility class which can be used to 'collect' child elements of a node. It implements the ItemVisitor interface.
  • Constructor Details

    • ChildrenCollector

      public ChildrenCollector(Collection children, boolean collectNodes, boolean collectProperties, int maxLevel)
      Constructs a ChildrenCollector
      Parameters:
      children - where the matching children should be added
      collectNodes - true, if child nodes should be collected; otherwise false
      collectProperties - true, if child properties should be collected; otherwise false
      maxLevel - number of hierarchy levels to traverse (e.g. 1 for direct children only, 2 for children and their children, and so on)