|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.taco.data.CollectionUtilities
public class CollectionUtilities
A static utility class for manipulating collections.
Constructor Summary | |
---|---|
protected |
CollectionUtilities()
Since this class is not meant to be instantiated, the sole constructor is protected. |
Method Summary | |
---|---|
static java.util.Collection |
addElements(java.util.Collection c,
java.util.Collection d)
Add the elements in d to c . |
static int[] |
toIntArray(java.util.Collection c)
Convert the collection of instances of Number to an array
of ints. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected CollectionUtilities()
Method Detail |
---|
public static final int[] toIntArray(java.util.Collection c)
Number
to an array
of ints.
c
- A collection of instances of Number
.
c
, containing
the int versions of the elements of c
, in the same order.
java.lang.NullPointerException
- if c
is null
.
java.lang.ClassCastException
- if any element in c is not an instance of
Number
.public static final java.util.Collection addElements(java.util.Collection c, java.util.Collection d)
d
to c
. Return
c
. This method is useful for initializing collections in
field declarations.
c
- The collection to add to and to return.d
- The collection that holds the elements to add to
c
.
c
java.lang.NullPointerException
- if either c
or d
is null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |