Here you can find the source of arrayContains(T[] ts, T t)
public static <T> boolean arrayContains(T[] ts, T t)
//package com.java2s; //License from project: Apache License public class Main { public static <T> boolean arrayContains(T[] ts, T t) { for (T t1 : ts) { if ((t1 == null || t == null) && t != t1) continue; if (t1 == t || t1.equals(t)) return true; }/* ww w. j a v a 2s . c om*/ return false; } }