Java Array Empty Check isNotEmpty(Object[] ObjectArray)

Here you can find the source of isNotEmpty(Object[] ObjectArray)

Description

is Not Empty

License

Apache License

Parameter

Parameter Description

Return

boolean

Declaration

public static boolean isNotEmpty(Object[] ObjectArray) 

Method Source Code

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

import java.util.List;

public class Main {

    public static boolean isNotEmpty(List list) {
        boolean returnBoolean = false;
        if (list != null && list.size() > 0) {
            returnBoolean = true;/*from w  w w  . j  a  v a  2 s .  c o  m*/
        }

        return returnBoolean;
    }

    public static boolean isNotEmpty(Object[] ObjectArray) {
        boolean returnBoolean = false;
        if (ObjectArray != null && ObjectArray.length > 0) {
            returnBoolean = true;
        }

        return returnBoolean;
    }

    public static boolean isNotEmpty(String string) {
        return !isEmpty(string);
    }

    public static boolean isEmpty(String string) {
        if (string == null || "".equals(string)) {
            return true;
        }
        return false;
    }
}

Related

  1. isNotEmpty(Object[] array)
  2. isNotEmpty(Object[] array)
  3. isNotEmpty(Object[] array)
  4. isNotEmpty(Object[] array)
  5. isNotEmpty(Object[] arrs)
  6. isNotEmpty(T[] array)
  7. isNotEmpty(T[] array)
  8. isNotEmpty(T[] array)
  9. isNotEmpty(T[] array)