.. java:import:: org.apache.commons.lang StringUtils .. java:import:: java.util HashSet .. java:import:: java.util Set MotechEnumUtils =============== .. java:package:: org.motechproject.commons.api :noindex: .. java:type:: public final class MotechEnumUtils Misc enum-related helper functions Methods ------- toEnumSet ^^^^^^^^^ .. java:method:: public static Set toEnumSet(Class enumClass, Set strings) :outertype: MotechEnumUtils Returns a set of enums given a set of strings and an enum class :param enumClass: the enum class :param strings: a set of strings :return: the enum set constructed from the given string set toEnumSet ^^^^^^^^^ .. java:method:: public static Set toEnumSet(Class enumClass, String csv) :outertype: MotechEnumUtils Returns a set of enums given a comma separated string and an enum class :param enumClass: the enum class :param csv: a comma separated string representing a set of enum values :return: the enum set constructed from the given string toString ^^^^^^^^ .. java:method:: public static String toString(Set items) :outertype: MotechEnumUtils Returns a csv string given a set of enums :param items: a set of enums :return: the csv string constructed from the given enum set toStringSet ^^^^^^^^^^^ .. java:method:: public static Set toStringSet(Set items) :outertype: MotechEnumUtils Returns a set of strings given a set of enums :param items: a set of enums :return: the string set constructed from the given enum set