com.jdroid.java.utils
Class CollectionUtils

java.lang.Object
  extended by com.jdroid.java.utils.CollectionUtils

public abstract class CollectionUtils
extends Object

A set of useful functions used against a Collection


Constructor Summary
protected CollectionUtils()
           
 
Method Summary
static boolean isEmpty(Collection<?> coll)
          Null-safe check if the specified collection is empty.
static boolean isEmptyCollection(Object object)
           
static boolean isNotEmpty(Collection<?> coll)
          Null-safe check if the specified collection is not empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionUtils

protected CollectionUtils()
Method Detail

isEmpty

public static boolean isEmpty(Collection<?> coll)
Null-safe check if the specified collection is empty.

Null returns true.

Parameters:
coll - the collection to check, may be null
Returns:
true if empty or null

isEmptyCollection

public static boolean isEmptyCollection(Object object)

isNotEmpty

public static boolean isNotEmpty(Collection<?> coll)
Null-safe check if the specified collection is not empty.

Null returns false.

Parameters:
coll - the collection to check, may be null
Returns:
true if non-null and non-empty


Copyright © 2014. All rights reserved.