Here you can find the source of containsAll(final Collection> c, final Object... array)
public static boolean containsAll(final Collection<?> c, final Object... array)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { public static boolean containsAll(final Collection<?> c, final Object... array) { for (int i = 0; i < array.length; i++) { if (!c.contains(array[i])) { return false; }/*from w ww .ja v a2 s .c o m*/ } return true; } public static boolean containsAll(final Collection<? super Boolean> c, final boolean... array) { for (int i = 0; i < array.length; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Byte> c, final byte... array) { for (int i = 0; i < array.length; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Character> c, final char... array) { for (int i = 0; i < array.length; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Short> c, final short... array) { for (int i = 0; i < array.length; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Integer> c, final int... array) { for (int i = 0; i < array.length; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Long> c, final long... array) { for (int i = 0; i < array.length; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Float> c, final float... array) { for (int i = 0; i < array.length; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Double> c, final double... array) { for (int i = 0; i < array.length; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<?> c, final Object[] array, final int off, final int len) { final int end = off + len; for (int i = off; i < end; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Boolean> c, final boolean[] array, final int off, final int len) { final int end = off + len; for (int i = off; i < end; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Byte> c, final byte[] array, final int off, final int len) { final int end = off + len; for (int i = off; i < end; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Character> c, final char[] array, final int off, final int len) { final int end = off + len; for (int i = off; i < end; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Short> c, final short[] array, final int off, final int len) { final int end = off + len; for (int i = off; i < end; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Integer> c, final int[] array, final int off, final int len) { final int end = off + len; for (int i = off; i < end; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Long> c, final long[] array, final int off, final int len) { final int end = off + len; for (int i = off; i < end; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Float> c, final float[] array, final int off, final int len) { final int end = off + len; for (int i = off; i < end; i++) { if (!c.contains(array[i])) { return false; } } return true; } public static boolean containsAll(final Collection<? super Double> c, final double[] array, final int off, final int len) { final int end = off + len; for (int i = off; i < end; i++) { if (!c.contains(array[i])) { return false; } } return true; } }