Java Array Contain arrayContains(Object obj, Object[] array)

Here you can find the source of arrayContains(Object obj, Object[] array)

Description

array Contains

License

Open Source License

Declaration

public static boolean arrayContains(Object obj, Object[] array) 

Method Source Code

//package com.java2s;
/*// w  ww.  j a  va  2 s. c  o  m
 * Copyright 2000-2013 Enonic AS
 * http://www.enonic.com/license
 */

public class Main {
    public static boolean arrayContains(Object obj, Object[] array) {
        for (int i = 0; i < array.length; ++i) {
            if (array[i].equals(obj)) {
                return true;
            }
        }

        return false;
    }
}

Related

  1. arrayContains(final T[] array, final T v)
  2. arrayContains(int[] arr, int e)
  3. arrayContains(int[] arr, int ii)
  4. arrayContains(int[] array, int value)
  5. arrayContains(int[] array, int value)
  6. arrayContains(Object[] a, Object ob)
  7. arrayContains(Object[] array, Object el)
  8. arrayContains(Object[] array, Object el)
  9. arrayContains(Object[] array, Object element)