boolean (Object o) { if (!(o instanceof DistinctPair dp)) return false; EqClass first = dp.getFirst(); EqClass second = dp.getSecond(); if (first.isEmpty() || second.isEmpty()) return false; int firstVal = first.get(0); int secondVal = second.get(0); int firstIndex = myState.getEqClassIndex(myState.getFactory().getValue(firstVal)); if (firstIndex == -1) return false; int secondIndex = myState.getEqClassIndex(myState.getFactory().getValue(secondVal)); if (secondIndex == -1) return false; long pair = createPair(firstIndex, secondIndex, dp.isOrdered()); return myData.contains(pair) && decode(pair).equals(dp); }