Details
-
Type:
Sub-task
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.0-JSR-3
-
Fix Version/s: None
-
Component/s: groovy-jdk
-
Labels:None
-
Number of attachments :
Description
collection.toList() vs. asList()
// there should be only one variant
My understanding is as follows:
Perhaps the correct approach would have been to not provide things like sort (modify semantics) on collection but only on ordered collections (e.g. List, Queue & LinkedHashSet) and require the user to use toList(), toOrderedSet(), etc. explicitly. Pity Java doesn't have OrderedSet etc. instead of just SortedSet.