Example usage for java.util List isEmpty

List of usage examples for java.util List isEmpty

Introduction

In this page you can find the example usage for java.util List isEmpty.

Prototype

boolean isEmpty();

Source Link

Document

Returns true if this list contains no elements.

Usage

From source file:Main.java

public static boolean isAvaliable(List list) {
    return list != null && !list.isEmpty();
}

From source file:Main.java

public static <D> boolean isEmpty(List<D> list) {
    return list == null || list.isEmpty();
}

From source file:Main.java

public static boolean isEmpty(List list) {
    if (list == null || list.isEmpty()) {
        return true;
    }//ww w  .j a  v a  2  s. c  o m
    return false;
}

From source file:Main.java

public static <E> boolean isListEmpty(List<E> list) {
    return list == null || list.isEmpty();
}

From source file:Main.java

public static boolean isListEmpty(List list) {
    if (list == null || list.isEmpty()) {
        return true;
    }/*  ww  w.j  a v a  2  s .c  om*/
    return false;
}

From source file:Main.java

public static boolean isNullOrEmpty(List<?> list) {
    return null == list || list.isEmpty();
}

From source file:Main.java

public static boolean isEmpty(List<?> list) {
    return (list == null || list.isEmpty());
}

From source file:Main.java

public static <T> T getFirst(List<T> l) {
    if (l == null || l.isEmpty())
        return null;
    return l.get(0);
}

From source file:Main.java

public static boolean isBlankList(List list) {
    if (list != null && !list.isEmpty()) {
        return false;
    } else {/*from   www. j a  v a  2s. c om*/
        return true;
    }
}

From source file:Main.java

public static <E> int getListSize(List<E> list) {
    if (list != null && !list.isEmpty()) {
        return list.size();
    }/*ww  w  .j av a  2 s .  c  o m*/
    return 0;
}