maidh91 / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Set operations over SortedSets #368

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be great to have the assorted Sets methods applied to SortedSets 
(e.g., union, intersection, difference that return SortedSetView).

Any chance of seeing that in the future?  Right now I have a number of cases 
where I just dump the result of Sets.xxx into a SortedSet constructor/factory.

Original issue reported on code.google.com by blank...@gmail.com on 10 Jun 2010 at 3:35

GoogleCodeExporter commented 9 years ago
We're working on releasing support for the primitive operations of ordered 
iterators (union, intersection, merge, etc.), so it should be quite natural for 
SortedSet views to be made atop that.  I think.  We'll see how it goes, thanks 
for filing.

Original comment by kevinb@google.com on 10 Jun 2010 at 4:54

GoogleCodeExporter commented 9 years ago

Original comment by fry@google.com on 26 Jan 2011 at 10:17

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 13 Jul 2011 at 6:18

GoogleCodeExporter commented 9 years ago

Original comment by fry@google.com on 10 Dec 2011 at 3:46

GoogleCodeExporter commented 9 years ago

Original comment by fry@google.com on 16 Feb 2012 at 7:17

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 30 May 2012 at 7:41

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 30 May 2012 at 7:45

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 22 Jun 2012 at 6:16

GoogleCodeExporter commented 9 years ago
FYI, I don't think it's a good idea to just drop in a new overload for e.g. 
Sets.union.  If nothing else, the iteration order will change incompatibly.  
Instead, it probably makes more sense to add e.g. Sets.unionSorted.

It sounds like we're confident this will be used, it's just a matter of 
implementation, correct?

Original comment by wasserman.louis on 26 Jun 2012 at 2:10

GoogleCodeExporter commented 9 years ago
I would still use it with whatever naming convention gets settled on, sure.

As offered in the original request, my vote is for a SortedSets+SortedSetView 
utility class*, since I imagined (and again, would still find useful) applying 
the change to union as well as intersection, difference, etc - and it seems 
silly to have Sets.unionSorted, Sets.intersectionSorted, Sets.differenceSorted, 
etc.

*or Navigable*, but I haven't kept up with if Guava is going that direction.

Original comment by blank...@gmail.com on 26 Jun 2012 at 2:47

GoogleCodeExporter commented 9 years ago
We've more or less established the precedent that we will not be creating -- or 
at least exposing -- separate SortedSets, SortedMaps, NavigableMaps, etc. 
classes in Guava.  (Indeed, I briefly accidentally created one; it has since 
been deprecated out of Guava.)

Original comment by wasserman.louis on 26 Jun 2012 at 2:49

GoogleCodeExporter commented 9 years ago
Just read the release 12 notes; looks like development is on the JDK6 train, so 
that footnote in my last should be upgraded to my preference, for whatever 
that's worth.

Original comment by blank...@gmail.com on 26 Jun 2012 at 2:49

GoogleCodeExporter commented 9 years ago
Issue 1804 has been merged into this issue.

Original comment by lowas...@google.com on 16 Jul 2014 at 6:50

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:15

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:18

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:10