com.ezware.oxbow.swingbits.graphics
Class CollectionUtils
java.lang.Object
com.ezware.oxbow.swingbits.graphics.CollectionUtils
public class CollectionUtils
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CollectionUtils
public CollectionUtils()
isEmpty
public static final boolean isEmpty(Collection<?> c)
- Checks if collection is empty. Null references are considered to be empty collections.
- Parameters:
c
-
- Returns:
- true if collection is empty
trySort
public static <T> Collection<T> trySort(Collection<T> c)
- Tries to sort collection. All elements have to implement Comparable interface and
be mutually comparable
- Type Parameters:
T
- - Parameters:
any
- collection
- Returns:
- new sorted collection if succeeded otherwise same collection
Copyright © 2011. All Rights Reserved.