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