public static <T> SetUpdateState update(@NotNull T element, @NotNull Set<T> set) {
    return !set.remove(element) ? IGNORED : set.add(element) ? UPDATED : REMOVED;
  }
public static <T> SetUpdateState update(@NotNull T element, @NotNull Set<T> set)