Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/EmptyIterator.java')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/EmptyIterator.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/EmptyIterator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/EmptyIterator.java
index e29f4a042f0..40b1874fdeb 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/EmptyIterator.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/EmptyIterator.java
@@ -19,6 +19,11 @@ public final class EmptyIterator<T> implements Iterator<T>
public static final EmptyIterator<?> EMPTY_ITERATOR = new EmptyIterator<Object>();
+ @SuppressWarnings("unchecked")
+ public static <T> EmptyIterator<T> empty() {
+ return (EmptyIterator<T>) EMPTY_ITERATOR;
+ }
+
private EmptyIterator()
{
}

Back to the top