swlnet / google-collections

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

Please provide Sets.symmetricDifference() #300

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently Sets.difference(a, b) and Sets.difference(b, a) are not the same.
Please provide a Sets.symmetricDifference(a, b) method which returns the set 
of elements that are in either set a or set b but not both according to the 
definition here: 
http://www.itl.nist.gov/div897/sqg/dads/HTML/symmetricSetDiff.html

Please also update the documentation for Sets.difference() to indicate that it 
is 
not symmetric (despite the obvious assumption from set theory) and that the 
user should use Sets.symmetricDifference() if that's what they want.

Original issue reported on code.google.com by adewale on 18 Nov 2009 at 10:23

GoogleCodeExporter commented 9 years ago
I have added a patch that provides the required functionality and a test for it.

Original comment by adewale on 3 Dec 2009 at 4:13

Attachments:

GoogleCodeExporter commented 9 years ago
The patch is the wrong implementation as explained off-line, but the request is 
valid.

Original comment by kevinb@google.com on 8 Dec 2009 at 5:29

GoogleCodeExporter commented 9 years ago
This issue has been moved to the Guava project (keeping the same id number). 
Simply replace 'google-collections' with 'guava-libraries' in your address 
bar and it should take you there.

Original comment by kevinb@google.com on 5 Jan 2010 at 11:09