Here you can find the source of arrayContains(Object[] array, Object el)
Parameter | Description |
---|---|
array | The array to check |
el | The element to look for in this array |
public static boolean arrayContains(Object[] array, Object el)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; public class Main { /**//from w w w .j av a 2 s . c o m * Checks to see if an array of objects contains a given element * * @param array The array to check * @param el The element to look for in this array * * @return True if this array contains the element, else false. * */ public static boolean arrayContains(Object[] array, Object el) { return Arrays.asList(array).contains(el); } }