Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/collection/CollectionTools.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/collection/CollectionTools.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/collection/CollectionTools.java
index 6f3439fc74..83e93eef18 100644
--- a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/collection/CollectionTools.java
+++ b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/collection/CollectionTools.java
@@ -18,6 +18,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.TreeSet;
import java.util.Vector;
+import org.eclipse.jpt.common.utility.collection.Bag;
import org.eclipse.jpt.common.utility.collection.Queue;
import org.eclipse.jpt.common.utility.collection.Stack;
import org.eclipse.jpt.common.utility.predicate.Predicate;
@@ -664,6 +665,15 @@ public final class CollectionTools {
return set;
}
+ /**
+ * Return a bag corresponding to the specified stack, draining the stack
+ * in the process.
+ * The specified stack size is a performance hint.
+ */
+ public static <E> Bag<E> emptyBag() {
+ return EmptyBag.<E>instance();
+ }
+
// ********** identity bag factory methods **********

Back to the top