Into (original) (raw)
Raab, Donald Donald.Raab at gs.com
Wed Dec 26 07:51:33 PST 2012
- Previous message: Proposed rename of Map.forEach(BiBlock<? super K, ? super V> block)
- Next message: Into
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Just to clarify, if these methods are added to Stream, we won't have any conflicts, as our methods appear on our Collections. But I think it might still be good to clarify the names.
-----Original Message----- From: Raab, Donald [Tech] Sent: Wednesday, December 26, 2012 10:47 AM To: 'Doug Lea'; 'lambda-libs-spec-experts at openjdk.java.net' Subject: RE: Into
We have methods to toSortedSet() and toSortedMap() that return SortedSet and SortedMap (as the names imply). We remain compatible back to Java 5, where NavigableSet and NavigableMap do not exist. I would request either calling the methods toNavigableSet()/toNavigableMap() and returning NavigableSet/NavigableMap or having both toSorted and toNavigable forms and returning the appropriately named types.
> > Object[] toArray(); > Set toSet(); > List toList(); > List toRandomAccessList(); > List toSortedList(Comparator<? super T> comparator); > List toSortedList(); > NavigableSet toSortedSet(); > NavigableSet toSortedSet(Comparator<? super T> comparator); > Collection toBag(); // unordered, possible dups > Map<K,T> toMap(Function<? super T,K> keyFn, BinaryOperator > mergeFn); > Map<K,<Collection> toMap(Function<? super T,K> keyFn); > NavigableMap<K,T> toSortedMap(Function<? super T,K> keyFn, > Comparator<? super K> comparator, > BinaryOperator mergeFn); > NavigableMap<K,Collection> toSortedMap(Function<? super_ _> T,K> keyFn, > Comparator<? super_ _> K> comparator);
- Previous message: Proposed rename of Map.forEach(BiBlock<? super K, ? super V> block)
- Next message: Into
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the lambda-libs-spec-experts mailing list