Here you can find the source of containsWhitespace(List
public static boolean containsWhitespace(List<String> elements)
//package com.java2s; //License from project: Mozilla Public License import java.util.Iterator; import java.util.List; public class Main { public static boolean containsWhitespace(List<String> elements) { Iterator itr = elements.iterator(); while (itr.hasNext()) { String element = (String) itr.next(); if (element.trim().equals("")) { return true; }/* w w w .ja va 2 s. c om*/ } return false; } }