Java List Contain contains(String str, List list)

Here you can find the source of contains(String str, List list)

Description

contains

License

Open Source License

Declaration

public static String contains(String str, List<String> list) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {

    public static String contains(String str, List<String> list) {
        for (String s : list) {
            if (str.indexOf(s) != -1) {
                return s;
            }/*ww w.  ja va  2s  . c om*/
        }
        return null;
    }
}

Related

  1. contains(List list, List> listOfLists)
  2. contains(List list, String str, boolean bcaseSensitive)
  3. contains(List list, String string)
  4. contains(List list1, List list2)
  5. contains(List container, List list, Comparator comparator)
  6. contains1(final String id, final List idList)
  7. containsAFloatingPointNumber(List values)
  8. containsAll(List list, T... items)
  9. containsAllIgnoreCase(List left, List right)