Java List Contain strContainsbyList(String str, List filterList)

Here you can find the source of strContainsbyList(String str, List filterList)

Description

check each line whether contains special str

License

Apache License

Parameter

Parameter Description
str a parameter
filterList a parameter

Declaration

public static Boolean strContainsbyList(String str, List<String> filterList) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    /**//from  w w  w. j  a v a 2s  .  c  o m
     * check each line whether contains special str
     *
     * @param str
     * @param filterList
     * @return
     */
    public static Boolean strContainsbyList(String str, List<String> filterList) {
        Boolean strFounded = false;
        for (int i = 0; i < filterList.size(); i++) {
            if (str.contains(filterList.get(i))) {
                strFounded = true;
                break;
            }
            //System.out.println(list.get(i));
        }
        return strFounded;
    }
}

Related

  1. isEitherContains(List one, List two)
  2. isListContainAll(List list, T... checkItems)
  3. isListContainsDuplicateElement(List oneList)
  4. pathContains(List path, String source, String label, String target)
  5. replaceWithList(List containingList, String key, List list)
  6. stringContains(String line, List list)
  7. stringContainsItemFromList(String inputString, List items)
  8. stringsContainsQuery(String query, List args)