boolean (Object obj) { if (obj == this) return true; if (!(obj instanceof CompletionElement)) return false; Object thatObj = ((CompletionElement)obj).myEqualityObject; if (myEqualityObject instanceof MethodSignature) { return thatObj instanceof MethodSignature && MethodSignatureUtil.areSignaturesErasureEqual((MethodSignature)myEqualityObject, (MethodSignature)thatObj); } return Comparing.equal(myEqualityObject, thatObj); }