public final class IteratorUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Iterator |
EMPTY_ITERATOR |
Modifier and Type | Method and Description |
---|---|
static boolean |
equivalent(Iterator ii,
Iterator jj) |
static void |
fillArray(Iterator ii,
Object[] fillMe) |
static void |
fillArray(Iterator ii,
Object[] fillMe,
boolean null_terminate)
Fills an array with the contents of an iterator.
|
static Iterator |
oneElementUnmodifiableIterator(Object elem) |
static Object[] |
toArray(Iterator ii,
int array_size,
Class componentClass) |
static Object[] |
toArray(Iterator ii,
int array_size,
Class componentClass,
boolean null_terminate) |
static Object[] |
toArray(Iterator ii,
int ii_size,
Object[] maybeFillMe)
Designed to help implement Collection.toArray(Object[] )methods...
|
static ArrayList |
toArrayList(Iterator ii,
int initial_capacity) |
public static final Iterator EMPTY_ITERATOR
public static void fillArray(Iterator ii, Object[] fillMe, boolean null_terminate)
null_terminate
- iff there is extra space in the array, set the element
immediately after the last from the iterator to null.public static Object[] toArray(Iterator ii, int array_size, Class componentClass, boolean null_terminate)
null_terminate
- iff there is extra space in the array, set the element
immediately after the last from the iterator to null.Copyright © 2018 com.mchange. All rights reserved.