Here you can find the source of isNullList(List l)
Parameter | Description |
---|---|
l | List |
public static boolean isNullList(List l)
//package com.java2s; /*//w w w . jav a 2 s .c o m * The contents of this file are subject to the Mozilla Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is "EINRC-7 / GDEM project". * * The Initial Developer of the Original Code is TietoEnator. * The Original Code code was developed for the European * Environment Agency (EEA) under the IDA/EINRC framework contract. * * Copyright (C) 2000-2004 by European Environment Agency. All * Rights Reserved. * * Original Code: Kaido Laine (TietoEnator) */ import java.util.List; public class Main { /** * Is Null or empty list * @param l List * @return True if Null or empty list */ public static boolean isNullList(List l) { if (l == null) { return true; } else if (l.size() == 0) { return true; } return false; } }