@Override
    public boolean contains(Object object) {
      if (object instanceof OrdinalValue<?>) {
        OrdinalValue<?> value = (OrdinalValue<?>) object;
        if (value.domain().equals(domain)) {
          return containsOrdinal(value.ordinal());
        }
      }
      return false;
    }
Will throw an exception and leave the collection unmodified.
@throws UnsupportedOperationException always
@deprecated Modification operation are not supported.
ordinal/src/org/immutables/ordinal/ImmutableOrdinalSet.java