Class ChildrenCollectorFilter

  • All Implemented Interfaces:
    ItemVisitor

    public class ChildrenCollectorFilter
    extends TraversingItemVisitor.Default
    ChildrenCollectorFilter is a utility class which can be used to 'collect' child items of a node whose names match a certain pattern. It implements the ItemVisitor interface.
    • Constructor Detail

      • ChildrenCollectorFilter

        public ChildrenCollectorFilter​(java.lang.String namePattern,
                                       java.util.Collection<Item> children,
                                       boolean collectNodes,
                                       boolean collectProperties,
                                       int maxLevel)
        Constructs a ChildrenCollectorFilter
        Parameters:
        namePattern - the pattern which should be applied to the names of the children
        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)
      • ChildrenCollectorFilter

        public ChildrenCollectorFilter​(java.lang.String[] nameGlobs,
                                       java.util.Collection<Item> children,
                                       boolean collectNodes,
                                       boolean collectProperties,
                                       int maxLevel)
        Constructs a ChildrenCollectorFilter
        Parameters:
        nameGlobs - an array of globbing strings which should be applied to the names of the children
        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)