public class ObjectIterators
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static speiger.src.collections.objects.utils.ObjectIterators.EmptyIterator<?> |
EMPTY
Empty Iterator Reference
|
| Constructor and Description |
|---|
ObjectIterators() |
| Modifier and Type | Method and Description |
|---|---|
static <T> speiger.src.collections.objects.utils.ObjectIterators.EmptyIterator<T> |
emptyIterator()
Returns a Immutable EmptyIterator instance that is automatically casted.
|
static <T> ObjectBidirectionalIterator<T> |
invert(ObjectBidirectionalIterator<T> it)
Inverter function for Bidirectional Iterators
|
static <T> ObjectListIterator<T> |
invert(ObjectListIterator<T> it)
Inverter function for List Iterators
|
static <T> ObjectBidirectionalIterator<T> |
unmodifiable(ObjectBidirectionalIterator<T> iterator)
Returns a Immutable Iterator instance based on the instance given.
|
static <T> ObjectIterator<T> |
unmodifiable(ObjectIterator<T> iterator)
Returns a Immutable Iterator instance based on the instance given.
|
static <T> ObjectListIterator<T> |
unmodifiable(ObjectListIterator<T> iterator)
Returns a Immutable ListIterator instance based on the instance given.
|
static <T> int |
unwrap(T[] a,
java.util.Iterator<? extends T> i)
Iterates over a iterator and inserts the values into the array and returns the amount that was inserted
|
static <T> int |
unwrap(T[] a,
java.util.Iterator<? extends T> i,
int offset)
Iterates over a iterator and inserts the values into the array and returns the amount that was inserted
|
static <T> int |
unwrap(T[] a,
java.util.Iterator<? extends T> i,
int offset,
int max)
Iterates over a iterator and inserts the values into the array and returns the amount that was inserted
|
static <T> int |
unwrap(T[] a,
ObjectIterator<T> i)
A Primitive iterator variant of the ObjectIterators unwrap function
Iterates over a iterator and inserts the values into the array and returns the amount that was inserted
|
static <T> int |
unwrap(T[] a,
ObjectIterator<T> i,
int offset)
A Primitive iterator variant of the ObjectIterators unwrap function
Iterates over a iterator and inserts the values into the array and returns the amount that was inserted
|
static <T> int |
unwrap(T[] a,
ObjectIterator<T> i,
int offset,
int max)
A Primitive iterator variant of the ObjectIterators unwrap function
Iterates over a iterator and inserts the values into the array and returns the amount that was inserted
|
static <T> speiger.src.collections.objects.utils.ObjectIterators.ArrayIterator<T> |
wrap(T[] a)
Returns a Array Wrapping iterator
|
static <T> speiger.src.collections.objects.utils.ObjectIterators.ArrayIterator<T> |
wrap(T[] a,
int start,
int end)
Returns a Array Wrapping iterator
|
public static final speiger.src.collections.objects.utils.ObjectIterators.EmptyIterator<?> EMPTY
public static <T> speiger.src.collections.objects.utils.ObjectIterators.EmptyIterator<T> emptyIterator()
T - the type of elements maintained by this Collectionpublic static <T> ObjectBidirectionalIterator<T> invert(ObjectBidirectionalIterator<T> it)
T - the type of elements maintained by this Collectionit - the iterator that should be invertedpublic static <T> ObjectListIterator<T> invert(ObjectListIterator<T> it)
T - the type of elements maintained by this Collectionit - the iterator that should be invertedpublic static <T> ObjectIterator<T> unmodifiable(ObjectIterator<T> iterator)
T - the type of elements maintained by this Collectioniterator - that should be made immutable/unmodifyablepublic static <T> ObjectBidirectionalIterator<T> unmodifiable(ObjectBidirectionalIterator<T> iterator)
T - the type of elements maintained by this Collectioniterator - that should be made immutable/unmodifyablepublic static <T> ObjectListIterator<T> unmodifiable(ObjectListIterator<T> iterator)
T - the type of elements maintained by this Collectioniterator - that should be made immutable/unmodifyablepublic static <T> speiger.src.collections.objects.utils.ObjectIterators.ArrayIterator<T> wrap(T[] a)
T - the type of array that the operation should be applieda - the array that should be wrappedpublic static <T> speiger.src.collections.objects.utils.ObjectIterators.ArrayIterator<T> wrap(T[] a,
int start,
int end)
T - the type of array that the operation should be applieda - the array that should be wrapped.start - the index to be started from.end - the index that should be ended.public static <T> int unwrap(T[] a,
java.util.Iterator<? extends T> i)
T - the type of array that the operation should be applieda - where the elements should be insertedi - the source iteratorpublic static <T> int unwrap(T[] a,
java.util.Iterator<? extends T> i,
int offset)
T - the type of array that the operation should be applieda - where the elements should be insertedi - the source iteratoroffset - the array offset where the start should bepublic static <T> int unwrap(T[] a,
java.util.Iterator<? extends T> i,
int offset,
int max)
T - the type of array that the operation should be applieda - where the elements should be insertedi - the source iteratoroffset - the array offset where the start should bemax - the maximum values that should be extracted from the sourcejava.lang.IllegalStateException - if max is smaller the 0 or if the maximum index is larger then the arraypublic static <T> int unwrap(T[] a,
ObjectIterator<T> i)
T - the type of array that the operation should be applieda - where the elements should be insertedi - the source iteratorpublic static <T> int unwrap(T[] a,
ObjectIterator<T> i,
int offset)
T - the type of array that the operation should be applieda - where the elements should be insertedi - the source iteratoroffset - the array offset where the start should bepublic static <T> int unwrap(T[] a,
ObjectIterator<T> i,
int offset,
int max)
T - the type of array that the operation should be applieda - where the elements should be insertedi - the source iteratoroffset - the array offset where the start should bemax - the maximum values that should be extracted from the sourcejava.lang.IllegalStateException - if max is smaller the 0 or if the maximum index is larger then the array