class CategoryNode extends DefaultMutableTreeNode {

  private final Category category;
  private boolean enabled;

  CategoryNode(Category category, boolean enabled) {
    super(category);
    this.category = category;
    this.enabled = enabled;
  }

  Category getCategory() {
    return category;
  }

  boolean isEnabled() {
    return enabled;
  }

  void setEnabled(boolean enabled) {
    this.enabled = enabled;
  }

  @Override
  public String toString() {<FILL_FUNCTION_BODY>}

}

    int children = this.getChildCount();
    int selected = 0;
    for (int i = 0; i < children; i++) {
      RuleNode child = (RuleNode) this.getChildAt(i);
      if (child.isEnabled()) {
        selected++;
      }
    }
    return String.format("%s (%d/%d)", category.getName(), selected, children);
  
<methods>public void <init>() ,public void <init>(java.lang.Object) ,public void <init>(java.lang.Object, boolean) ,public void add(javax.swing.tree.MutableTreeNode) ,public Enumeration<javax.swing.tree.TreeNode> breadthFirstEnumeration() ,public Enumeration<javax.swing.tree.TreeNode> children() ,public java.lang.Object clone() ,public Enumeration<javax.swing.tree.TreeNode> depthFirstEnumeration() ,public boolean getAllowsChildren() ,public javax.swing.tree.TreeNode getChildAfter(javax.swing.tree.TreeNode) ,public javax.swing.tree.TreeNode getChildAt(int) ,public javax.swing.tree.TreeNode getChildBefore(javax.swing.tree.TreeNode) ,public int getChildCount() ,public int getDepth() ,public javax.swing.tree.TreeNode getFirstChild() ,public javax.swing.tree.DefaultMutableTreeNode getFirstLeaf() ,public int getIndex(javax.swing.tree.TreeNode) ,public javax.swing.tree.TreeNode getLastChild() ,public javax.swing.tree.DefaultMutableTreeNode getLastLeaf() ,public int getLeafCount() ,public int getLevel() ,public javax.swing.tree.DefaultMutableTreeNode getNextLeaf() ,public javax.swing.tree.DefaultMutableTreeNode getNextNode() ,public javax.swing.tree.DefaultMutableTreeNode getNextSibling() ,public javax.swing.tree.TreeNode getParent() ,public javax.swing.tree.TreeNode[] getPath() ,public javax.swing.tree.DefaultMutableTreeNode getPreviousLeaf() ,public javax.swing.tree.DefaultMutableTreeNode getPreviousNode() ,public javax.swing.tree.DefaultMutableTreeNode getPreviousSibling() ,public javax.swing.tree.TreeNode getRoot() ,public javax.swing.tree.TreeNode getSharedAncestor(javax.swing.tree.DefaultMutableTreeNode) ,public int getSiblingCount() ,public java.lang.Object getUserObject() ,public java.lang.Object[] getUserObjectPath() ,public void insert(javax.swing.tree.MutableTreeNode, int) ,public boolean isLeaf() ,public boolean isNodeAncestor(javax.swing.tree.TreeNode) ,public boolean isNodeChild(javax.swing.tree.TreeNode) ,public boolean isNodeDescendant(javax.swing.tree.DefaultMutableTreeNode) ,public boolean isNodeRelated(javax.swing.tree.DefaultMutableTreeNode) ,public boolean isNodeSibling(javax.swing.tree.TreeNode) ,public boolean isRoot() ,public Enumeration<javax.swing.tree.TreeNode> pathFromAncestorEnumeration(javax.swing.tree.TreeNode) ,public Enumeration<javax.swing.tree.TreeNode> postorderEnumeration() ,public Enumeration<javax.swing.tree.TreeNode> preorderEnumeration() ,public void remove(int) ,public void remove(javax.swing.tree.MutableTreeNode) ,public void removeAllChildren() ,public void removeFromParent() ,public void setAllowsChildren(boolean) ,public void setParent(javax.swing.tree.MutableTreeNode) ,public void setUserObject(java.lang.Object) ,public java.lang.String toString() <variables>public static final Enumeration<javax.swing.tree.TreeNode> EMPTY_ENUMERATION,protected boolean allowsChildren,protected Vector<javax.swing.tree.TreeNode> children,protected javax.swing.tree.MutableTreeNode parent,private static final long serialVersionUID,protected transient java.lang.Object userObject