@Test(expected = IllegalStateException.class) public void shouldThrowWhenGivenInvalidEnumStringVal() throws Exception { Set<String> invalidStringSet = new HashSet<>(STRING_SET); invalidStringSet.add("INVALID_ENUM_STRING_VALUE"); MotechEnumUtils.toEnumSet(FooBar.class, invalidStringSet); }
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);  }