Java List Contain containsReference(List references, Object toBeFound)

Here you can find the source of containsReference(List references, Object toBeFound)

Description

contains Reference

License

Open Source License

Declaration

public static boolean containsReference(List<?> references, Object toBeFound) 

Method Source Code

//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;
    }
}

Related

  1. containsOnly(List elements, Class clazz)
  2. containsOnlyEmptyValues(List list)
  3. containsOnlyNulls(List list)
  4. containsOnlySequentialNumbers(List values)
  5. containsOrIsEmpty(List list, Object item)
  6. containsSameItemsInOrder(List col1, List col2)
  7. containsStr(List list, String str)
  8. containsStringStartingWith(List list, String prefix)
  9. containsSubsequence(List a, List b)