Here you can find the source of isAnyElementContains(String str, Collection
public static boolean isAnyElementContains(String str, Collection<String> col)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { public static boolean isAnyElementContains(String str, Collection<String> col) { for (String url : col) { if (str.contains(url)) { return true; }//w w w . j av a 2 s . c o m } return false; } }