I looked under the hood for EnumSet.allOf
and it looks very efficient, especially for enums with less than 64 values.
Basically all sets share the singl
You should use the approach which is simplest and clearest to you. Performance shouldn't be a consideration in most situations.
IMHO: neither option performs very well as they both create objects. One in the first case and three in the second. You could construct a constant which holds all the values for performance reasons.