Java Collection Check isBlankAll(Collection... collections)

Here you can find the source of isBlankAll(Collection... collections)

Description

is Blank All

License

Apache License

Declaration

public static boolean isBlankAll(Collection<?>... collections) 

Method Source Code

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

import java.util.Collection;

public class Main {

    public static boolean isBlankAll(Collection<?>... collections) {
        for (Collection<?> c : collections) {
            if (!isBlank(c)) {
                return false;
            }//from  w  w w.  java2 s.c om
        }

        return true;
    }

    public static boolean isBlankAll(String... strings) {
        for (String s : strings) {
            if (!isBlank(s)) {
                return false;
            }
        }

        return true;
    }

    public static boolean isBlank(String string) {
        return string == null || string.trim().equals("");
    }

    public static boolean isBlank(Object[] array) {
        return array == null || array.length == 0;
    }

    public static boolean isBlank(Collection<? extends Object> array) {
        return array == null || array.size() == 0;
    }
}

Related

  1. isBlank(Collection c)
  2. isBlank(Collection c)
  3. isBlank(Collection collection)
  4. isBlank(final Collection c)
  5. isBlank(final Collection collection)
  6. isC2InC1(Collection c1, Collection c2)
  7. isClassCollection(Class c)
  8. isClassCollection(Class c)
  9. isClassCollection(Class type)