From cef858c1908cdbe93d0473e7b3abaa82397fafc6 Mon Sep 17 00:00:00 2001 From: luukkainen Date: Thu, 10 Nov 2011 15:41:18 +0000 Subject: [PATCH] Arrays utility git-svn-id: https://www.simantics.org/svn/simantics/interoperability/trunk@23239 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../org/simantics/interop/utils/Arrays.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 org.simantics.interop/src/org/simantics/interop/utils/Arrays.java diff --git a/org.simantics.interop/src/org/simantics/interop/utils/Arrays.java b/org.simantics.interop/src/org/simantics/interop/utils/Arrays.java new file mode 100644 index 0000000..c455115 --- /dev/null +++ b/org.simantics.interop/src/org/simantics/interop/utils/Arrays.java @@ -0,0 +1,27 @@ +package org.simantics.interop.utils; + +import java.util.Collection; + +/** + * TODO : merge to os.utils.datastructures. + * + * @author Marko Luukkainen + * + */ +public class Arrays { + + public static boolean containsAll(Collection coll, T[] arr) { + for (T t : arr) { + if (!coll.contains(t)) + return false; + } + return true; + } + + public static void addAll(Collection coll, T[] arr) { + for (T t : arr) { + coll.add(t); + } + } + +} -- 2.47.1