From: luukkainen Date: Thu, 10 Nov 2011 15:41:18 +0000 (+0000) Subject: Arrays utility X-Git-Tag: v1.31.0~99 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=cef858c1908cdbe93d0473e7b3abaa82397fafc6;p=simantics%2Finterop.git Arrays utility git-svn-id: https://www.simantics.org/svn/simantics/interoperability/trunk@23239 ac1ea38d-2e2b-0410-8846-a27921b304fc --- 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); + } + } + +}