Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2015-02-25 08:33:13 +0000
committerEike Stepper2015-02-25 08:33:13 +0000
commit998a1909194b81dae4b0acbd72dc169c1a3b53a2 (patch)
tree20d6c988dde704278a8517d64e22fec68bbe0850 /plugins/org.eclipse.net4j.util
parent746c282c602274e6a2d67cecd966dde52a99e1b6 (diff)
downloadcdo-998a1909194b81dae4b0acbd72dc169c1a3b53a2.tar.gz
cdo-998a1909194b81dae4b0acbd72dc169c1a3b53a2.tar.xz
cdo-998a1909194b81dae4b0acbd72dc169c1a3b53a2.zip
[458349] Consolidate UI
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=458349
Diffstat (limited to 'plugins/org.eclipse.net4j.util')
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/CollectionUtil.java40
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/Predicate.java2
2 files changed, 42 insertions, 0 deletions
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/CollectionUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/CollectionUtil.java
new file mode 100644
index 0000000000..74c78df44e
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/CollectionUtil.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2013 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.util.collection;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Various static helper methods.
+ *
+ * @author Eike Stepper
+ * @since 3.5
+ */
+public final class CollectionUtil
+{
+ private CollectionUtil()
+ {
+ }
+
+ public static <T> Iterator<T> dump(Iterator<T> it)
+ {
+ List<T> list = new ArrayList<T>();
+ while (it.hasNext())
+ {
+ list.add(it.next());
+ }
+
+ System.out.println(list);
+ return list.iterator();
+ }
+}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/Predicate.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/Predicate.java
index 276622be95..84769584e4 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/Predicate.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/collection/Predicate.java
@@ -13,7 +13,9 @@ package org.eclipse.net4j.util.collection;
/**
* @author Eike Stepper
* @since 3.3
+ * @deprecated as of 3.5 use {@link org.eclipse.net4j.util.Predicate}.
*/
+@Deprecated
public interface Predicate<T>
{
public boolean apply(T element);

Back to the top