org.pentaho.di.core.util
Class CollectionPredicates

java.lang.Object
  extended by org.pentaho.di.core.util.CollectionPredicates

public final class CollectionPredicates
extends Object

Version:
$Revision
Author:
Thomas Hoedl(asc042)

Field Summary
static org.apache.commons.collections.Predicate EMPTY_ARRAY
          Empty array.
static org.apache.commons.collections.Predicate EMPTY_COLLECTION
          Empty collection.
static org.apache.commons.collections.Predicate EMPTY_MAP
          Empty map.
static org.apache.commons.collections.Predicate NOT_EMPTY_ARRAY
          Not empty array.
static org.apache.commons.collections.Predicate NOT_EMPTY_COLLECTION
          Not empty collection.
static org.apache.commons.collections.Predicate NOT_EMPTY_MAP
          Not empty map.
static org.apache.commons.collections.Predicate NOT_NULL_OR_EMPTY_ARRAY
          Not null or empty array.
static org.apache.commons.collections.Predicate NOT_NULL_OR_EMPTY_COLLECTION
          Not null or empty collection.
static org.apache.commons.collections.Predicate NOT_NULL_OR_EMPTY_MAP
          Not null or empty map.
static org.apache.commons.collections.Predicate NULL_OR_EMPTY_ARRAY
          Null or empty array.
static org.apache.commons.collections.Predicate NULL_OR_EMPTY_COLLECTION
          Null or empty collection.
static org.apache.commons.collections.Predicate NULL_OR_EMPTY_MAP
          Null or empty map.
 
Method Summary
static boolean isNotNullOrEmpty(Collection<?> subject)
           
static boolean isNotNullOrEmpty(Map<?,?> subject)
           
static boolean isNotNullOrEmpty(Object[] subject)
           
static boolean isNullOrEmpty(Collection<?> subject)
           
static boolean isNullOrEmpty(Map<?,?> subject)
           
static boolean isNullOrEmpty(Object[] subject)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_COLLECTION

public static final org.apache.commons.collections.Predicate EMPTY_COLLECTION
Empty collection.


NOT_EMPTY_COLLECTION

public static final org.apache.commons.collections.Predicate NOT_EMPTY_COLLECTION
Not empty collection.


EMPTY_ARRAY

public static final org.apache.commons.collections.Predicate EMPTY_ARRAY
Empty array.


NOT_EMPTY_ARRAY

public static final org.apache.commons.collections.Predicate NOT_EMPTY_ARRAY
Not empty array.


EMPTY_MAP

public static final org.apache.commons.collections.Predicate EMPTY_MAP
Empty map.


NOT_EMPTY_MAP

public static final org.apache.commons.collections.Predicate NOT_EMPTY_MAP
Not empty map.


NOT_NULL_OR_EMPTY_COLLECTION

public static final org.apache.commons.collections.Predicate NOT_NULL_OR_EMPTY_COLLECTION
Not null or empty collection.


NOT_NULL_OR_EMPTY_ARRAY

public static final org.apache.commons.collections.Predicate NOT_NULL_OR_EMPTY_ARRAY
Not null or empty array.


NOT_NULL_OR_EMPTY_MAP

public static final org.apache.commons.collections.Predicate NOT_NULL_OR_EMPTY_MAP
Not null or empty map.


NULL_OR_EMPTY_COLLECTION

public static final org.apache.commons.collections.Predicate NULL_OR_EMPTY_COLLECTION
Null or empty collection.


NULL_OR_EMPTY_ARRAY

public static final org.apache.commons.collections.Predicate NULL_OR_EMPTY_ARRAY
Null or empty array.


NULL_OR_EMPTY_MAP

public static final org.apache.commons.collections.Predicate NULL_OR_EMPTY_MAP
Null or empty map.

Method Detail

isNullOrEmpty

public static boolean isNullOrEmpty(Collection<?> subject)
Parameters:
subject - the subject.
Returns:
true if null or empty.

isNotNullOrEmpty

public static boolean isNotNullOrEmpty(Collection<?> subject)
Parameters:
subject - the subject.
Returns:
true if not null or empty.

isNullOrEmpty

public static boolean isNullOrEmpty(Object[] subject)
Parameters:
subject - the subject.
Returns:
true if null or empty.

isNotNullOrEmpty

public static boolean isNotNullOrEmpty(Object[] subject)
Parameters:
subject - the subject.
Returns:
true if not null or empty.

isNullOrEmpty

public static boolean isNullOrEmpty(Map<?,?> subject)
Parameters:
subject - the subject.
Returns:
true if null or empty.

isNotNullOrEmpty

public static boolean isNotNullOrEmpty(Map<?,?> subject)
Parameters:
subject - the subject.
Returns:
true if not null or empty.