A DESCRIPTION OF THE REQUEST :
EnumSet implements Set. We can't take full advantage of the order in an enum unless EnumSet implements SortedSet.
JUSTIFICATION :
enums have a defined order. EnumSet should take advantage of this to implement SortedSet efficiently.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I'd like to see EnumSet provide all the API for SortedSet.
ACTUAL -
EnumSet only supports the Set API.
---------- BEGIN SOURCE ----------
EnumSet.allOf(SomeEnumSet).headSet(SomeEnumSet.SOMEMEMBER);
won't compile.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Current plan is to reimplement EnumSet correctly. I'll look into posting the fix after I've done it.
###@###.### 2005-05-31 17:13:49 GMT