int (Object object) { if (object == state) { if (roots == null) roots = state.getRoots(); return roots.size(); } else if (object instanceof Node) { Entry<Node> entry = getEntry((Node)object, true); if (entry != null) return entry.getChildCount(); } return 0; }