If the elements of an enumerated type are used primarily in sets, it is traditional to use the int enum pattern (Item 34), assigning a different power of 2 to each ...
// Parameter is bitwise OR of zero or more STYLE_ constants public void applyStyles(int styles) { ... } This representation lets you use the bitwise OR operation to combine several constants into a ...
After having spent several years developing primarily in C++, I missed having an enum in Java until it was finally introduced with J2SE 5. The long wait was worth it because the Java enum is much more ...