@Test public void shouldReturnValidEnumSetFromStringSet() throws Exception { Set<FooBar> actual; actual = MotechEnumUtils.toEnumSet(FooBar.class, STRING_SET); assertEquals(actual, ENUM_SET); actual = MotechEnumUtils.toEnumSet(FooBar.class, STRING_SET2); assertEquals(actual, ENUM_SET); actual = MotechEnumUtils.toEnumSet(FooBar.class, STRING_SET3); assertEquals(actual, ENUM_SET); actual = MotechEnumUtils.toEnumSet(FooBar.class, STRING_SET4); assertEquals(actual, ENUM_SET); }
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);  }