@Test public void shouldReturnEmptyEnumSet() { Set<FooBar> actual; actual = MotechEnumUtils.toEnumSet(FooBar.class, EMPTY_STRING_SET); assertTrue(actual.isEmpty()); actual = MotechEnumUtils.toEnumSet(FooBar.class, EMPTY_STRING); assertTrue(actual.isEmpty()); actual = MotechEnumUtils.toEnumSet(FooBar.class, (String) null); assertTrue(actual.isEmpty()); }
public static <T extends Enum> Set<T> toEnumSet(Class<T> enumClass, Set<String> strings) { Set<T> set = new HashSet<>(); for (String string : strings) { set.add(toEnum(enumClass, string)); } return set; }
MotechEnumUtils { public static <T extends Enum> Set<T> toEnumSet(Class<T> enumClass, Set<String> strings) { Set<T> set = new HashSet<>(); for (String string : strings) { set.add(toEnum(enumClass, string)); } return set; } }
MotechEnumUtils { public static <T extends Enum> Set<T> toEnumSet(Class<T> enumClass, Set<String> strings) { Set<T> set = new HashSet<>(); for (String string : strings) { set.add(toEnum(enumClass, string)); } return set; } private  MotechEnumUtils(); }
MotechEnumUtils { public static <T extends Enum> Set<T> toEnumSet(Class<T> enumClass, Set<String> strings) { Set<T> set = new HashSet<>(); for (String string : strings) { set.add(toEnum(enumClass, string)); } return set; } private  MotechEnumUtils(); static Set<String> toStringSet(Set<? extends Enum> items); static String toString(Set<? extends Enum> items); static Set<T> toEnumSet(Class<T> enumClass, Set<String> strings); static Set<T> toEnumSet(Class<T> enumClass, String csv); }
MotechEnumUtils { public static <T extends Enum> Set<T> toEnumSet(Class<T> enumClass, Set<String> strings) { Set<T> set = new HashSet<>(); for (String string : strings) { set.add(toEnum(enumClass, string)); } return set; } private  MotechEnumUtils(); static Set<String> toStringSet(Set<? extends Enum> items); static String toString(Set<? extends Enum> items); static Set<T> toEnumSet(Class<T> enumClass, Set<String> strings); static Set<T> toEnumSet(Class<T> enumClass, String csv);  }