Java Array Value Any anyBlank(String... ss)

Here you can find the source of anyBlank(String... ss)

Description

any Blank

License

Open Source License

Declaration

public static boolean anyBlank(String... ss) 

Method Source Code

//package com.java2s;
/*/*from   w  w w  .  j ava2s  . co m*/
 * This file is part of ConfigHub.
 *
 * ConfigHub is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * ConfigHub is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.??See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with ConfigHub.??If not, see <http://www.gnu.org/licenses/>.
 */

public class Main {
    public static boolean anyBlank(String... ss) {
        if (null == ss || ss.length == 0) {
            return true;
        }

        for (String s : ss) {
            if (isBlank(s)) {
                return true;
            }
        }
        return false;
    }

    public static boolean isBlank(String s) {
        if (null == s) {
            return true;
        }

        if ("".equals(s.trim())) {
            return true;
        }

        return false;
    }
}

Related

  1. any(boolean[] b)
  2. any(boolean[] values)
  3. any(final String a, final String b)
  4. anyAreEmpty(String... words)
  5. anyEmpty(final String head, final String... tail)
  6. anyEmpty(String[] array)
  7. anyEmptyField(String[] items)
  8. anyEqual(int item, int... expected)