void () { boolean includeSelfDependency = false; for (Iterator<InferenceGraphNode<T>> iterator = myDependencies.iterator(); iterator.hasNext(); ) { InferenceGraphNode<T> d = iterator.next(); assert d.myValue.size() >= 1; final T initialNodeValue = d.myValue.get(0); if (myValue.contains(initialNodeValue)) { includeSelfDependency = true; iterator.remove(); } } if (includeSelfDependency) { myDependencies.add(this); } }