android/guava/src/com/google/common/collect/Sets.java
public static <E extends Enum<E>> EnumSet<E> complementOf(
      Collection<E> collection, Class<E> type) {
    checkNotNull(collection);
    return (collection instanceof EnumSet)
        ? EnumSet.complementOf((EnumSet<E>) collection)
        : makeComplementByHand(collection, type);
  }
public static <E extends Enum<E>> EnumSet<E> complementOf(
      Collection<E> collection, Class<E> type) {
    checkNotNull(collection);
    return (collection instanceof EnumSet)
        ? EnumSet.complementOf((EnumSet<E>) collection)
        : makeComplementByHand(collection, type);
  }
Creates an {@code EnumSet} consisting of all enum values that are not in the specified
collection. This is equivalent to {@link EnumSet#complementOf}, but can act on any input
collection, as long as the elements are of enum type.

@param collection the collection whose complement should be stored in the {@code EnumSet}
@param type the type of the elements in the set
@return a new, modifiable {@code EnumSet} initially containing all the values of the enum not
present in the given collection