public abstract class BidirectionalIterators extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> BidirectionalIterator<T> |
concat(BidirectionalIterator<? extends T>... theIterators)
Returns a bidirectional iterator that is the concatenation of
theIterators. |
static <T> BidirectionalIterator<T> |
concat(Iterable<? extends BidirectionalIterator<? extends T>> theIterators)
Returns a bidirectional iterator that is the concatenation of
theIterators. |
static <T> BidirectionalIterator<T> |
concat(Iterator<? extends BidirectionalIterator<? extends T>> theIterators)
Returns a bidirectional iterator that is the concatenation of
theIterators. |
static <T> BidirectionalIterator<T> |
emptyIterator()
Returns an empty bidirectional iterator.
|
static <T> BidirectionalIterator<T> |
forArray(T... theElements)
Returns a bidirectional iterator containing the elements of
array in order. |
static <T> BidirectionalIterator<T> |
forArray(T[] theElements,
int theOffset,
int theLimit)
Returns a bidirectional iterator containing the elements of
array in order that
will iterate beginning at theOffset (inclusive) until theLimit (exclusive). |
static <T> BidirectionalIterator<T> |
forList(List<T> theElements)
Returns a bidirectional iterator containing the elements of
list in order. |
static <T> BidirectionalIterator<T> |
rest(BidirectionalIterator<T> theIterator)
Returns a bidirectional iterator that returns the remaining elements of
theIterator without allowing
to go back in the iteration. |
static <T> BidirectionalIterator<T> |
singletonIterator(T theElement)
Returns a bidirectional iterator with a single element.
|
public static <T> BidirectionalIterator<T> emptyIterator()
public static <T> BidirectionalIterator<T> singletonIterator(T theElement)
public static <T> BidirectionalIterator<T> forArray(T... theElements)
array in order. The
returned iterator is a view of the array; subsequent changes to the array
will be reflected in the iterator.public static <T> BidirectionalIterator<T> forArray(T[] theElements, int theOffset, int theLimit)
array in order that
will iterate beginning at theOffset (inclusive) until theLimit (exclusive).
The returned iterator is a view of the array; subsequent changes to the array
will be reflected in the iterator.public static <T> BidirectionalIterator<T> forList(List<T> theElements)
list in order.
The returned iterator is not fail-safe and results when the list is concurrently
modified is undefined.public static <T> BidirectionalIterator<T> concat(BidirectionalIterator<? extends T>... theIterators)
theIterators.public static <T> BidirectionalIterator<T> concat(Iterable<? extends BidirectionalIterator<? extends T>> theIterators)
theIterators.public static <T> BidirectionalIterator<T> concat(Iterator<? extends BidirectionalIterator<? extends T>> theIterators)
theIterators.public static <T> BidirectionalIterator<T> rest(BidirectionalIterator<T> theIterator)
theIterator without allowing
to go back in the iteration. More accurately, the returned iterator will no allow more previous()
calls then next() calls even if theIterator has previous elements. Therefore, if
theIterator is advanced (forward or backward) outside the returned iterator then the behavior
will change.
If theIterator.hasPrevious() is false then the theIterator itself
will be returned.
Copyright © 2010-2016 Stardog Union. All Rights Reserved.