Here you can find the source of containsReference(List> references, Object toBeFound)
public static boolean containsReference(List<?> references, Object toBeFound)
//package com.java2s; /*/*from w w w.j a va 2 s.c o m*/ * Copyright (c) 2006-2012 Rog?rio Liesenfeld * This file is subject to the terms of the MIT license (see LICENSE.txt). */ import java.util.*; public class Main { public static boolean containsReference(List<?> references, Object toBeFound) { for (Object reference : references) { if (reference == toBeFound) { return true; } } return false; } }