Android Array Empty Check isAnyStringEmpty(String[] array)

Here you can find the source of isAnyStringEmpty(String[] array)

Description

is Any String Empty

License

LGPL

Declaration

public final static boolean isAnyStringEmpty(String[] array) 

Method Source Code

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

import java.util.Collection;
import android.text.TextUtils;

public class Main {
    public final static boolean isAnyStringEmpty(String[] array) {
        if (array == null || array.length <= 0)
            return false;

        for (String elem : array) {
            if (TextUtils.isEmpty(elem))
                return true;
        }//from   w w  w. j  a va2  s  .co m

        return false;
    }

    public final static boolean isAnyStringEmpty(
            Collection<String> collection) {
        if (collection == null || collection.isEmpty())
            return false;

        for (String elem : collection) {
            if (TextUtils.isEmpty(elem))
                return true;
        }

        return false;
    }
}

Related

  1. ckNonEmpty(String... argvs)
  2. isEmpty(Object[] array)
  3. isEmpty(T[] array)
  4. isEmpty(V[] sourceArray)
  5. isEmpty(boolean[] array)