| java.lang.Object com.mchange.v1.util.IteratorUtils
IteratorUtils | final public class IteratorUtils (Code) | | |
Method Summary | |
public static boolean | equivalent(Iterator ii, Iterator jj) | public static void | fillArray(Iterator ii, Object[] fillMe, boolean null_terminate) Fills an array with the contents of an iterator. | public static void | fillArray(Iterator ii, Object[] fillMe) | public static Iterator | oneElementUnmodifiableIterator(Object elem) | public static Object[] | toArray(Iterator ii, int array_size, Class componentClass, boolean null_terminate) | public static Object[] | toArray(Iterator ii, int array_size, Class componentClass) | public static Object[] | toArray(Iterator ii, int ii_size, Object[] maybeFillMe) Designed to help implement Collection.toArray(Object[] )methods... | public static ArrayList | toArrayList(Iterator ii, int initial_capacity) |
fillArray | public static void fillArray(Iterator ii, Object[] fillMe, boolean null_terminate)(Code) | | Fills an array with the contents of an iterator. If the array is too small,
it will contain the first portion of the iterator. If the array can contain
more elements than the iterator, extra elements are left untouched, unless
null_terminate is set to true, in which case the element immediately following
the last from the iterator is set to null. (This method is intended to make
it easy to implement Collection.toArray(Object[] oo) methods...
Parameters: null_terminate - iff there is extra space in the array, set the elementimmediately after the last from the iterator to null. |
oneElementUnmodifiableIterator | public static Iterator oneElementUnmodifiableIterator(Object elem)(Code) | | |
toArray | public static Object[] toArray(Iterator ii, int array_size, Class componentClass, boolean null_terminate)(Code) | | Parameters: null_terminate - iff there is extra space in the array, set the elementimmediately after the last from the iterator to null. |
toArray | public static Object[] toArray(Iterator ii, int ii_size, Object[] maybeFillMe)(Code) | | Designed to help implement Collection.toArray(Object[] )methods... does
the right thing if you can express an iterator and know the size of your
Collection.
|
|
|