Java Array Find findAll(int[] arr1, int[] arr2)

Here you can find the source of findAll(int[] arr1, int[] arr2)

Description

find All

License

LGPL

Declaration

public static boolean findAll(int[] arr1, int[] arr2) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.Arrays;

public class Main {
    public static boolean findAll(int[] arr1, int[] arr2) {
        for (int a1 : arr1) {
            if (!find(a1, arr2)) {
                return false;
            }/*from w  w  w .j a v a  2  s .  c om*/
        }
        return true;
    }

    public static boolean find(int a, int[] l) {
        return Arrays.binarySearch(l, a) >= 0;
    }
}

Related

  1. findAllArgumentPermutations(Object[][] allArguments)
  2. findAllOrientations(int[][] matrix)
  3. getIndex(double income, String[] scopes)
  4. getIndex(String[] array, String value)