public static boolean areSignaturesErasureEqual(@NotNull MethodSignature signature1, @NotNull MethodSignature signature2) { return METHOD_PARAMETERS_ERASURE_EQUALITY.equals(signature1, signature2); }
/** * Locates the index of <tt>obj</tt>. * * @param obj an <code>Object</code> value * @return the index of <tt>obj</tt> or -1 if it isn't in the set. */ protected int index(Object obj) { int hash, probe, index, length; Object[] set; Object cur; set = _set; length = set.length; hash = hashingStrategy.computeHashCode(obj) & 0x7fffffff; index = hash % length; cur = set[index]; if (cur != null && (cur == REMOVED || ! hashingStrategy.equals(cur, obj))) { // see Knuth, p. 529 probe = 1 + (hash % (length - 2)); do { index -= probe; if (index < 0) { index += length; } cur = set[index]; } while (cur != null && (cur == REMOVED || ! hashingStrategy.equals(cur, obj))); } return cur == null ? -1 : index; }
} else if (hashingStrategy.equals(cur, obj)) { return -index -1; // already stored } else { // already FULL or REMOVED, must probe } while (cur != null && cur != REMOVED && ! hashingStrategy.equals(cur, obj)); int firstRemoved = index; while (cur != null && (cur == REMOVED || ! hashingStrategy.equals(cur, obj))) { index -= probe; if (index < 0) {
@Override public boolean equals(PsiElement e1, PsiElement e2) { if (e1 instanceof BnfReferenceOrToken && e2 instanceof BnfReferenceOrToken || e1 instanceof BnfLiteralExpression && e2 instanceof BnfLiteralExpression) { return e1.getText().equals(e2.getText()); } return CANONICAL.equals(e1, e2); } };