Saturday, 3 May 2014

EnumSet : of

of method Creates an enum set initially containing the specified element or elements.

Java provides overloaded formats of this method.

public static <E extends Enum<E>> EnumSet<E> of(E e)
public static <E extends Enum<E>> EnumSet<E> of(E e1,E e2)
public static <E extends Enum<E>> EnumSet<E> of(E e1, E e2, E e3)
public static <E extends Enum<E>> EnumSet<E> of(E e1,E e2,E e3,E e4)
public static <E extends Enum<E>> EnumSet<E> of(E e1,E e2,E e3,E e4,E e5)
public static <E extends Enum<E>> EnumSet<E> of(E first, E... rest)

Prevoius                                                 Next                                                 Home

No comments:

Post a Comment