List of utility methods to do EnumSet to
int | enumSetToInt(EnumSet> enumSet) Encode an enum set to an integer representing a bit array. int b = 0; for (Object o : enumSet) { b += 1 << ((Enum) o).ordinal(); return b; |
Set | enumSetToStringSet(EnumSet> enumSet) enum Set To String Set Set<String> result = new HashSet<String>(); for (Enum<?> enumValue : enumSet) { result.add(enumValue.name()); return result; |
String | enumsToString(EnumSet enums To String if (elems != null) { StringBuilder buf = new StringBuilder(); for (ENUM e : elems) { if (buf.length() > 0) { buf.append(","); buf.append(e.name()); return buf.toString(); } else { return null; |