diff -r f91144b7da75 -r af8417e590f4 src/share/classes/com/sun/tools/javac/util/List.java
--- a/src/share/classes/com/sun/tools/javac/util/List.java Mon Feb 04 18:08:53 2013 -0500
+++ b/src/share/classes/com/sun/tools/javac/util/List.java Sun Feb 17 16:44:55 2013 -0500
@@ -96,6 +96,26 @@
return res.reverse();
}
+ public List intersect(List that) {
+ ListBuffer buf = ListBuffer.lb();
+ for (A el : this) {
+ if (that.contains(el)) {
+ buf.append(el);
+ }
+ }
+ return buf.toList();
+ }
+
+ public List diff(List that) {
+ ListBuffer buf = ListBuffer.lb();
+ for (A el : this) {
+ if (!that.contains(el)) {
+ buf.append(el);
+ }
+ }
+ return buf.toList();
+ }
+
/** Construct a list consisting of given element.
*/
public static List of(A x1) {