Here you can find the source of arrayContains(T search, T[] array, boolean def)
public static <T> boolean arrayContains(T search, T[] array, boolean def)
//package com.java2s; //License from project: Open Source License public class Main { public static <T> boolean arrayContains(T search, T[] array, boolean def) { if (array == null) { return def; }//from w ww. j av a 2 s. co m for (T t : array) { if (search.equals(t)) { return true; } } return false; } }