com.generationjava.collections
Class CollectionsW
java.lang.Object
com.generationjava.collections.CollectionsW
public final class CollectionsW
- extends java.lang.Object
A wrapper around the Collections. Provides functionality above and
beyond the duty of java.util's Collection API.
Method Summary |
static java.util.Collection |
cloneNewEmptyCollection(java.util.Collection coll)
|
static java.util.Map |
cloneNewEmptyMap(java.util.Map map)
|
static java.util.Iterator |
getIterator(java.lang.Object obj)
|
static java.lang.String[] |
getSubArray(java.lang.String[] ob,
int idx)
|
static java.lang.Object |
index(java.lang.Object obj,
int idx)
Given an Object, and an index, it will get the nth value in the
object. |
static java.lang.Object |
index(java.lang.Object obj,
java.lang.Object index)
|
static java.lang.Object[] |
iteratorToArray(java.util.Iterator iterator)
|
static java.lang.Object[] |
iteratorToArray(java.util.Iterator iterator,
java.lang.Object[] type)
|
static void |
reverseArray(java.lang.Object[] array)
|
static java.util.Collection |
slice(java.util.Collection coll,
int start,
int end)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CollectionsW
public CollectionsW()
index
public static java.lang.Object index(java.lang.Object obj,
int idx)
- Given an Object, and an index, it will get the nth value in the
object.
index
public static java.lang.Object index(java.lang.Object obj,
java.lang.Object index)
getIterator
public static java.util.Iterator getIterator(java.lang.Object obj)
slice
public static java.util.Collection slice(java.util.Collection coll,
int start,
int end)
cloneNewEmptyCollection
public static java.util.Collection cloneNewEmptyCollection(java.util.Collection coll)
cloneNewEmptyMap
public static java.util.Map cloneNewEmptyMap(java.util.Map map)
reverseArray
public static void reverseArray(java.lang.Object[] array)
getSubArray
public static java.lang.String[] getSubArray(java.lang.String[] ob,
int idx)
iteratorToArray
public static java.lang.Object[] iteratorToArray(java.util.Iterator iterator)
iteratorToArray
public static java.lang.Object[] iteratorToArray(java.util.Iterator iterator,
java.lang.Object[] type)