Here you can find the source of containsFileName(String fileName, List
public static boolean containsFileName(String fileName, List<String> filterList)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static boolean containsFileName(String fileName, List<String> filterList) { if (filterList == null || filterList.size() == 0) { return true; }//from w w w. j a v a 2s . c om for (String filter : filterList) { if (fileName.contains(filter)) { return true; } } return false; } }