Java Utililty Methods EnumSet Mask

List of utility methods to do EnumSet Mask

Description

The list of methods to do EnumSet Mask are organized into topic(s).

Method

EnumSetmask(EnumSet theSet, E mask)
mask
EnumSet<E> retval = EnumSet.copyOf(theSet);
EnumSet<E> theMask = EnumSet.of(mask);
retval.retainAll(theMask);
return retval;
EnumSetmask(EnumSet map, T key, boolean enabled)
mask
if (enabled) {
    map.add(key);
} else {
    map.remove(key);
return map;