/** * Creates an enum set filled with all the enum elements of the specified * {@code elementType}. * * @param elementType * the class object for the elements contained. * @return an enum set with elements solely from the specified element type. * @throws ClassCastException * if the specified element type is not and enum type. */ public static <E extends Enum<E>> EnumSet<E> allOf(Class<E> elementType) { EnumSet<E> set = noneOf(elementType); set.complement(); return set; }
/** * Creates an enum set. All the contained elements complement those from the * specified enum set. * * @param s * the specified enum set. * @return an enum set with all the elements complementary to those from the * specified enum set. * @throws NullPointerException * if {@code s} is {@code null}. */ 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 with the same element type as the specified enum * set, initially containing all the elements of this type that are * <i>not</i> contained in the specified set. * * @param s the enum set from whose complement to initialize this enum set * @throws NullPointerException if <tt>s</tt> is null */ public static <E extends Enum<E>> EnumSet<E> complementOf(EnumSet<E> s) { EnumSet<E> result = copyOf(s); result.complement(); return result; }
/** * Creates an enum set with the same element type as the specified enum * set, initially containing all the elements of this type that are * <i>not</i> contained in the specified set. * * @param s the enum set from whose complement to initialize this enum set * @throws NullPointerException if <tt>s</tt> is null */ public static <E extends Enum<E>> EnumSet<E> complementOf(EnumSet<E> s) { EnumSet<E> result = copyOf(s); result.complement(); return result; }
/** * Creates an enum set filled with all the enum elements of the specified * {@code elementType}. * * @param elementType * the class object for the elements contained. * @return an enum set with elements solely from the specified element type. * @throws ClassCastException * if the specified element type is not and enum type. */ public static <E extends Enum<E>> EnumSet<E> allOf(Class<E> elementType) { EnumSet<E> set = noneOf(elementType); set.complement(); return set; }
/** * Creates an enum set filled with all the enum elements of the specified * {@code elementType}. * * @param elementType * the class object for the elements contained. * @return an enum set with elements solely from the specified element type. * @throws ClassCastException * if the specified element type is not and enum type. */ public static <E extends Enum<E>> EnumSet<E> allOf(Class<E> elementType) { EnumSet<E> set = noneOf(elementType); set.complement(); return set; }
/** * Creates an enum set filled with all the enum elements of the specified * {@code elementType}. * * @param elementType * the class object for the elements contained. * @return an enum set with elements solely from the specified element type. * @throws ClassCastException * if the specified element type is not and enum type. */ public static <E extends Enum<E>> EnumSet<E> allOf(Class<E> elementType) { EnumSet<E> set = noneOf(elementType); set.complement(); return set; }
/** * Creates an enum set filled with all the enum elements of the specified * {@code elementType}. * * @param elementType * the class object for the elements contained. * @return an enum set with elements solely from the specified element type. * @throws ClassCastException * if the specified element type is not and enum type. */ public static <E extends Enum<E>> EnumSet<E> allOf(Class<E> elementType) { EnumSet<E> set = noneOf(elementType); set.complement(); return set; }
/** * Creates an enum set filled with all the enum elements of the specified * {@code elementType}. * * @param elementType * the class object for the elements contained. * @return an enum set with elements solely from the specified element type. * @throws ClassCastException * if the specified element type is not and enum type. */ public static <E extends Enum<E>> EnumSet<E> allOf(Class<E> elementType) { EnumSet<E> set = noneOf(elementType); set.complement(); return set; }
/** * Creates an enum set filled with all the enum elements of the specified * {@code elementType}. * * @param elementType * the class object for the elements contained. * @return an enum set with elements solely from the specified element type. * @throws ClassCastException * if the specified element type is not and enum type. */ public static <E extends Enum<E>> EnumSet<E> allOf(Class<E> elementType) { EnumSet<E> set = noneOf(elementType); set.complement(); return set; }
/** * Creates an enum set filled with all the enum elements of the specified * {@code elementType}. * * @param elementType * the class object for the elements contained. * @return an enum set with elements solely from the specified element type. * @throws ClassCastException * if the specified element type is not and enum type. */ public static <E extends Enum<E>> EnumSet<E> allOf(Class<E> elementType) { EnumSet<E> set = noneOf(elementType); set.complement(); return set; }
/** * Creates an enum set. All the contained elements complement those from the * specified enum set. * * @param s * the specified enum set. * @return an enum set with all the elements complementary to those from the * specified enum set. * @throws NullPointerException * if {@code s} is {@code null}. */ 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. * * @param s * the specified enum set. * @return an enum set with all the elements complementary to those from the * specified enum set. * @throws NullPointerException * if {@code s} is {@code null}. */ 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. * * @param s * the specified enum set. * @return an enum set with all the elements complementary to those from the * specified enum set. * @throws NullPointerException * if {@code s} is {@code null}. */ 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. * * @param s * the specified enum set. * @return an enum set with all the elements complementary to those from the * specified enum set. * @throws NullPointerException * if {@code s} is {@code null}. */ 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. * * @param s * the specified enum set. * @return an enum set with all the elements complementary to those from the * specified enum set. * @throws NullPointerException * if {@code s} is {@code null}. */ 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. * * @param s * the specified enum set. * @return an enum set with all the elements complementary to those from the * specified enum set. * @throws NullPointerException * if {@code s} is {@code null}. */ 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. * * @param s * the specified enum set. * @return an enum set with all the elements complementary to those from the * specified enum set. * @throws NullPointerException * if {@code s} is {@code null}. */ 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; }