Java Collection Contain containsString(Collection coll, String str)

Here you can find the source of containsString(Collection coll, String str)

Description

contains String

License

Open Source License

Declaration

public static boolean containsString(Collection<String> coll, String str) 

Method Source Code


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

import java.util.Collection;

public class Main {
    public static boolean containsString(Collection<String> coll, String str) {
        for (String s : coll) {
            if (s != null && s.contains(str))
                return true;
        }/*  w  ww  . j  a  v a2  s  .  c o m*/
        return false;
    }
}

Related

  1. containsSameItems(Collection col1, Collection col2)
  2. containsSameType(Object o, Collection collection)
  3. containsSome(Collection source, Collection target)
  4. containsSome(final Collection c1, final Collection c2)
  5. containsSome(HashSet s1, Collection other)
  6. containsString(String stringToCheck, Collection collection)
  7. containsStringIgnoreCase(Collection strings, String toCheck)
  8. getContainmentRelation(Collection a, Collection b)
  9. intersect(Collection container, Collection contained)