public class GripCollections
extends java.lang.Object
Constructor and Description |
---|
GripCollections()
Creates a new instance of GripCollections
|
Modifier and Type | Method and Description |
---|---|
static <K,V> java.util.Map<K,V> |
addArrayToMap(java.util.Map<K,V> map,
java.lang.Object[] items)
Adds items from the specified array to the map.
|
static <T,C extends java.util.Collection<? super T>> |
arrayToCollection(C c,
T[] array)
Fills the given Collection with the elements of the given array and returns
the Collection.
|
static <T> java.util.Vector<T> |
arrayToCollection(T[] array)
Creates a Vector
|
static boolean |
collectionsOverlap(java.util.Collection a,
java.util.Collection b)
Checks if there is at least one common element in the two specified
collections.
|
static <T> T[] |
collectionToArray(java.util.Collection<? extends T> c,
java.lang.Class<T> cls)
Creates a new T[] array where T is the same class as cls parameter and fills
it with elements of the given collection and then returns it.
|
static <T,C extends java.util.Collection<? super T>> |
newCollection(C c,
T... objs)
Fills the given Collection with the other parameters and returns
the Collection.
|
static <T> java.util.HashSet<T> |
newHashSet(T... objs)
Creates a new HashSet
|
static <T> java.util.Vector<T> |
newVector(T... objs)
Creates a new Vector
|
public GripCollections()
public static <T> java.util.Vector<T> arrayToCollection(T[] array)
public static <T,C extends java.util.Collection<? super T>> C arrayToCollection(C c, T[] array)
public static <T,C extends java.util.Collection<? super T>> C newCollection(C c, T... objs)
public static <T> java.util.Vector<T> newVector(T... objs)
public static <T> java.util.HashSet<T> newHashSet(T... objs)
public static <T> T[] collectionToArray(java.util.Collection<? extends T> c, java.lang.Class<T> cls)
public static <K,V> java.util.Map<K,V> addArrayToMap(java.util.Map<K,V> map, java.lang.Object[] items)
public static boolean collectionsOverlap(java.util.Collection a, java.util.Collection b)
Copyright 2004-2015 Wandora Team