Here you can find the source of arrayContainsEntry(T[] array, T entry)
private static <T> boolean arrayContainsEntry(T[] array, T entry)
//package com.java2s; /******************************************************************************* * Copyright (c) 2008, 2010 VMware Inc./* www .j a va2s .c om*/ * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * VMware Inc. - initial contribution *******************************************************************************/ public class Main { private static <T> boolean arrayContainsEntry(T[] array, T entry) { if (entry == null || array == null) { return false; } for (T arrayEntry : array) { if (arrayEntry != null && arrayEntry.equals(entry)) { return true; } } return false; } }