Java Array Empty Check isEmpty(String[] array)

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

Description

is Empty

License

Open Source License

Declaration

public static final boolean isEmpty(String[] array) 

Method Source Code

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

import java.util.Collection;

public class Main {
    public static final boolean isEmpty(String[] array) {
        return array == null || array.length == 0;
    }/*from   w w w . j a  v a  2s.c o m*/

    public static final boolean isEmpty(Collection<String> coll) {
        return coll == null || coll.isEmpty();
    }

    public static final boolean isEmpty(String foo) {
        return (foo == null || foo.trim().length() == 0);
    }

    public static String trim(String str) {
        return str == null ? null : str.trim();
    }
}

Related

  1. isEmpty(Object[] array)
  2. isEmpty(Object[] array)
  3. isEmpty(Object[] arrs)
  4. isEmpty(Object[] obj)
  5. isEmpty(Object[] values)
  6. isEmpty(T[] arr)
  7. isEmpty(T[] arr)
  8. isEmpty(T[] array)
  9. isEmpty(T[] array)