|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xins.common.collections.CollectionUtils
Utility functions for collections.
Method Summary | |
static ArrayList |
list(Iterator iterator)
Returns an array list containing the elements returned by the specified iterator in the order they are returned by the iterator. |
static ArrayList |
list(String argumentName,
Object[] array,
int min)
Returns an array list containing the elements in the specified array, in the same order. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ArrayList list(Iterator iterator) throws IllegalArgumentException
iterator
- the Iterator
providing elements for the returned array list,
cannot be null
.
ArrayList
containing the elements returned by the specified
iterator, never null
.
IllegalArgumentException
- if iterator == null
.public static ArrayList list(String argumentName, Object[] array, int min) throws IllegalArgumentException
No null
values or duplicates are allowed.
This method is reserved for internal use by the XINS framework. It may be removed in a future minor XINS release.
argumentName
- the name to assume for the array when constructing a message for an
IllegalArgumentException
, should not be
null
.array
- the array containing the elements to convert to an array list,
cannot be null
.min
- the minimum number of elements expected in the array.
ArrayList
containing the elements in the array, in the same
order, never null
.
IllegalArgumentException
- if array == null
|| array.length < min
|| array[i] == null
or if array
constains any duplicates.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |