boolean (@Nullable Object other) { T theElement = this.theElement; if (theElement != null) { return other instanceof Set && ((Set<?>)other).size() == 1 && Objects.equals(((Set<?>)other).iterator().next(), theElement); } return super.equals(other); }