void (boolean removeFromGraph) { if (removeFromGraph && parent != null && parent.children != null) { for (Iterator<DataNode<?>> iterator = parent.children.iterator(); iterator.hasNext(); ) { DataNode<?> dataNode = iterator.next(); if (System.identityHashCode(dataNode) == System.identityHashCode(this)) { iterator.remove(); if (parent.children.isEmpty()) parent.initChildren(null); break; } } } parent = null; initChildren(null); }