EnumSet<T extends Enum>.complementOf constructor

EnumSet<T extends Enum>.complementOf(
  1. EnumSet<T> other
)

Creates a new EnumSet which holds all elements which are not included in other.

Combining the new EnumSet and other will hold each element of the given Enum.

Implementation

factory EnumSet.complementOf(EnumSet<T> other) =>
    EnumSet<T>.of(other._enumConstants, other.complement());