static void
advance(Iterator<?> iterator, int n)
Advance n
times.
static <T> boolean
allMatch(Iterator<? extends T> iterator, Predicate<? super T> pred)
Returns whether all elements match the predicate.
static <T> boolean
anyMatch(Iterator<? extends T> iterator, Predicate<? super T> pred)
Returns whether some element match the predicate.
static <T> Iterable<T>
asReversed(List<T> lst)
static <T> Iterator<T>
coerceWildcard(Iterator<? extends T> it)
Coerce an iterator with a wildcard.
static <T> Iterator<T>
concat(Iterator<? extends T> as, Iterator<? extends T> bs)
static int
count(Iterator<?> it)
Counts the items in this iterator, exhausting it.
static <T> Iterator<T>
distinct(Iterator<? extends T> iter)
static <T> Iterator<T>
drop(Iterator<? extends T> source, int n)
Produce an iterator whose first element is the nth element of the given source.
static <T> Iterator<@NonNull T>
dropLast(Iterator<? extends @Nullable T> it, int n)
Remove the last n elements of the iterator.
static <T> Iterator<T>
filter(Iterator<? extends T> it, Predicate<? super T> filter)
static <T> Iterator<@NonNull T>
filterNotNull(Iterator<? extends T> it)
static <T,R>
Iterator<R>
flatMap(Iterator<? extends T> iter, Function<? super T,? extends @Nullable Iterator<? extends R>> f)
static <R> Iterator<R>
flatMapWithSelf(Iterator<? extends R> iter, Function<? super R,? extends @Nullable Iterator<? extends R>> f)
Like flatMap, but yields each element of the input iterator before yielding the results of the mapper function.
static <T> Iterator<@NonNull T>
generate(@Nullable T seed, Function<? super @NonNull T,? extends @Nullable T> stepper)
Returns an iterator that applies a stepping function to the previous value yielded.
static <T> @Nullable T
getNth(Iterator<? extends T> iterator, int n)
Returns the nth element of this iterator, or null if the iterator is shorter.
static <T> Iterator<T>
iterate(T... elements)
static <T> @Nullable T
last(Iterator<? extends T> iterator)
static <T,R>
Iterator<R>
map(Iterator<? extends T> iter, Function<? super T,? extends R> mapper)
static <T,R>
Iterable<R>
mapIterator(Iterable<? extends T> iter, Function<? super Iterator<? extends T>,? extends Iterator<R>> mapper)
Apply a transform on the iterator of an iterable.
static <T,R>
Iterator<@NonNull R>
mapNotNull(Iterator<? extends T> it, Function<? super T,? extends R> mapper)
static <T> boolean
noneMatch(Iterator<? extends T> iterator, Predicate<? super T> pred)
Returns whether no elements match the predicate.
static <T> Iterator<T>
peek(Iterator<? extends T> iter, Consumer<? super T> action)
static <T> Iterator<T>
reverse(Iterator<T> it)
static <T> Iterator<T>
singletonIterator(T value)
static <T> Iterator<T>
take(Iterator<? extends T> iterator, int n)
Limit the number of elements yielded by this iterator to the given number.
static <T> Iterator<T>
takeWhile(Iterator<T> iter, Predicate<? super T> predicate)
static <T> Iterable<T>
toIterable(Iterator<T> it)
static <T> List<T>
toList(Iterator<? extends T> it)
static <T> List<@NonNull T>
toNonNullList(Iterator<? extends @Nullable T> it)
static <T> Stream<T>
toStream(Iterator<? extends T> iter)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4