|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.util.CollectionUtil
public final class CollectionUtil
Utilities for Collections.
| Method Summary | ||
|---|---|---|
static
|
fanOutCombinations(java.util.List<java.util.Collection<E>> values)
Returns a collection containing all possible combinations of the input values. |
|
static java.lang.Class<?> |
findCommonSuperclass(java.util.Collection<java.lang.Class<?>> classes)
Finds a common superclass or superinterface for all the classes specified in the arguments. |
|
static java.util.Set<java.lang.Class<?>> |
findCommonSuperclasses(java.util.Collection<java.lang.Class<?>> classes)
Finds common superclasses and superinterfaces for all the classes specified in the arguments. |
|
static
|
groupByClass(java.util.Collection<E> objects,
boolean inherit)
Sorts objects in the given collection into different types by Class. |
|
static
|
linkedHashMapAdd(java.util.LinkedHashMap<K,V> map,
K prevKey,
K newKey,
V newValue)
Return a copy of the given map with the object inserted at the given index. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <K,V> java.util.LinkedHashMap<K,V> linkedHashMapAdd(java.util.LinkedHashMap<K,V> map,
K prevKey,
K newKey,
V newValue)
K - The key typeV - The value typemap - the LinkedHashMap to copyprevKey - the newKey,newValue pair are added after this key. If null the
newKey,newValue pair is added firstnewKey - the new keynewValue - the new value
public static <E> java.util.Map<java.lang.Class<?>,java.util.List<E>> groupByClass(java.util.Collection<E> objects,
boolean inherit)
E - the element typeobjects - a Collection of objectsinherit - if true, objects are put into all their class's superclasses as well, except
Object - the original Collection can be used in that case
public static <E> java.util.Collection<java.util.List<E>> fanOutCombinations(java.util.List<java.util.Collection<E>> values)
E - the element typevalues - a List of collections of values
public static java.util.Set<java.lang.Class<?>> findCommonSuperclasses(java.util.Collection<java.lang.Class<?>> classes)
classes - a Collection of Classes
public static java.lang.Class<?> findCommonSuperclass(java.util.Collection<java.lang.Class<?>> classes)
classes - a Collection of Classes
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||