Here you can find the source of isEmpty(Collection items)
Parameter | Description |
---|---|
items | collection |
public static boolean isEmpty(Collection items)
//package com.java2s; /*// w ww. jav a 2s.co m * Copyright (c) 2014 Simon Percic * * Get the latest version from: * https://github.com/simonpercic/CollectionHelper * * Distributed under the MIT License, see LICENSE.txt for details */ import java.util.Collection; public class Main { /** * Returns <tt>true</tt> if the collection is null or contains no elements. * * @param items collection * @return <tt>true</tt> if the collection is null or contains no elements */ public static boolean isEmpty(Collection items) { return (items == null || items.size() == 0); } }