- All Implemented Interfaces:
- public class FoldLargeNodes
- extends Object
- implements INodeApplicator
Fold (close) nodes with more than the given number of child nodes.
If a node is already folded, then we "trim" the tree (that is, we do not
descend on the node's children).
A parent node with (say) three children, where all of them are folded,
has a count of three regardless of how many children the folded nodes have.
This implementation is not used by MapUtils for
MapUtils.closeLargeNodes(Map, int). It is provided as an example
of how "trimming" a tree can be useful (that is, returning
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public FoldLargeNodes(int maxChildren)
public int apply(Node parentNode,
- Specified by:
apply in interface
protected int countChildren(Node node)
protected boolean isLeaf(Node node)
protected boolean isFolded(Node node)