Java List Contain contains(List aList, Object anObj)

Here you can find the source of contains(List aList, Object anObj)

Description

Returns whether list contains given object (accepts null list).

License

Open Source License

Declaration

public static boolean contains(List aList, Object anObj) 

Method Source Code


//package com.java2s;

import java.util.*;

public class Main {
    /**//from www .j  a  v a  2 s .c  om
     * Returns whether list contains given object (accepts null list).
     */
    public static boolean contains(List aList, Object anObj) {
        return aList != null && aList.contains(anObj);
    }
}

Related

  1. contains(final String text, final List tokens)
  2. contains(final String[] list, final String value)
  3. contains(int[] list, int x)
  4. contains(int[] match, List container)
  5. contains(int[] subject, int[][] list)
  6. contains(List list, Object obj)
  7. contains(List lsttor, Object val)
  8. contains(List list, Object element, int begin, int end)
  9. contains(List objects, Object object)