|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jocl.cloth.utils.CollectionUtils
public class CollectionUtils
Utility methods for collections.
| Method Summary | ||
|---|---|---|
static
|
asListList(java.lang.Iterable<? extends java.util.Collection<? extends T>> collections)
Returns the given collections as a list of lists |
|
static
|
asListListList(java.lang.Iterable<? extends java.lang.Iterable<? extends java.util.Collection<? extends T>>> collections)
Returns the given collections as a list of lists of lists |
|
static
|
asSetList(java.lang.Iterable<? extends java.util.Collection<? extends T>> collections)
Returns the given collections as a list of sets |
|
static
|
collectionBySizeComparator()
Returns a comparator that compares collections by their size, in ascending order |
|
static
|
computeTotalSize(java.lang.Iterable<? extends java.util.Collection<? extends T>> collections)
Returns the total size of the given collections |
|
static
|
containsAny(java.util.Collection<? extends T> containing,
java.lang.Iterable<? extends T> anyOfThese)
Returns whether the first collection contains any of the elements of the second sequence of elements |
|
static
|
flatten(java.lang.Iterable<? extends java.util.Collection<? extends T>> collections)
Flatten the contents of the given sequence of collections. |
|
static
|
largest(java.lang.Iterable<T> collections)
Returns the largest of the given collections |
|
static
|
maxSize(java.lang.Iterable<T> collections)
Returns the size of the largest collection |
|
static
|
minSize(java.lang.Iterable<T> collections)
Returns the size of the smallest collection |
|
static
|
smallest(java.lang.Iterable<T> collections)
Returns the smallest of the given collections |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T extends java.util.Collection<?>> java.util.Comparator<T> collectionBySizeComparator()
T - The type of the collection
public static <T extends java.util.Collection<?>> T largest(java.lang.Iterable<T> collections)
T - The type of the collectionscollections - The collections
public static <T extends java.util.Collection<?>> T smallest(java.lang.Iterable<T> collections)
T - The type of the collectionscollections - The collections
public static <T extends java.util.Collection<?>> int maxSize(java.lang.Iterable<T> collections)
T - The type of the collectionscollections - The collections
public static <T extends java.util.Collection<?>> int minSize(java.lang.Iterable<T> collections)
T - The type of the collectionscollections - The collections
public static <T> java.util.List<T> flatten(java.lang.Iterable<? extends java.util.Collection<? extends T>> collections)
T - The content typecollections - The collections
public static <T> java.util.List<java.util.List<T>> asListList(java.lang.Iterable<? extends java.util.Collection<? extends T>> collections)
T - The content type of the listscollections - The collections
public static <T> java.util.List<java.util.List<java.util.List<T>>> asListListList(java.lang.Iterable<? extends java.lang.Iterable<? extends java.util.Collection<? extends T>>> collections)
T - The content type of the listscollections - The collections
public static <T> java.util.List<java.util.Set<T>> asSetList(java.lang.Iterable<? extends java.util.Collection<? extends T>> collections)
T - The content type of the setscollections - The collections
public static <T> boolean containsAny(java.util.Collection<? extends T> containing,
java.lang.Iterable<? extends T> anyOfThese)
T - The content typecontaining - The collection potentially containing the elementsanyOfThese - The elements that may be contained in the collection
public static <T> int computeTotalSize(java.lang.Iterable<? extends java.util.Collection<? extends T>> collections)
T - The content type of the collectionscollections - The collections
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||