public boolean equals(Object object) {if (this == object) {return true;}if (object instanceof Set) {Set<?> s = (Set<?>) object;try {return size() == s.size() && containsAll(s);} catch (NullPointerException ignored) {return false;} catch (ClassCastException ignored) {return false;}}return false;}