public static <E extends Enum<E>>EnumSet<E> complementOf(EnumSet<E> s){
  EnumSet<E> set=EnumSet.noneOf(s.elementClass);
  set.addAll(s);
  set.complement();
  return set;
}

public static < E extends Enum < E > > EnumSet < E > complementOf ( EnumSet < E > s ) { EnumSet < E > set = EnumSet . noneOf ( s . elementClass ) ; set . addAll ( s ) ; set . complement ( ) ; return set ; }
creates an enum set . all the contained elements complement those from the specified enum set .
