Package com.c8db
Interface C8Iterable<T>
-
- All Superinterfaces:
Iterable<T>
- All Known Subinterfaces:
C8Cursor<T>
- All Known Implementing Classes:
AbstractC8Iterable,C8CursorImpl,C8FilterIterable,C8MappingIterable
public interface C8Iterable<T> extends Iterable<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanallMatch(Predicate<? super T> predicate)Returns whether all elements of thisArangoIterablematch the provided predicate.booleananyMatch(Predicate<? super T> predicate)Returns whether any elements of thisArangoIterablematch the provided predicate.<R extends Collection<? super T>>
RcollectInto(R target)Iterates over all elements of thisArangoIterableand adds each to the given target.longcount()Returns the count of elements of thisArangoIterable.C8Iterable<T>filter(Predicate<? super T> predicate)Returns aArangoIterableconsisting of the elements of thisArangoIterablethat match the given predicate.Tfirst()Returns the first element ornullif no element exists.voidforeach(Consumer<? super T> action)Performs the given action for each element of theArangoIterableC8Iterator<T>iterator()<R> C8Iterable<R>map(Function<? super T,? extends R> mapper)Returns aArangoIterableconsisting of the results of applying the given function to the elements of thisArangoIterable.booleannoneMatch(Predicate<? super T> predicate)Returns whether no elements of thisArangoIterablematch the provided predicate.-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
iterator
C8Iterator<T> iterator()
-
foreach
void foreach(Consumer<? super T> action)
Performs the given action for each element of theArangoIterable- Parameters:
action- a action to perform on the elements
-
map
<R> C8Iterable<R> map(Function<? super T,? extends R> mapper)
Returns aArangoIterableconsisting of the results of applying the given function to the elements of thisArangoIterable.- Parameters:
mapper- a function to apply to each element- Returns:
- the new
ArangoIterable
-
filter
C8Iterable<T> filter(Predicate<? super T> predicate)
Returns aArangoIterableconsisting of the elements of thisArangoIterablethat match the given predicate.- Parameters:
predicate- a predicate to apply to each element to determine if it should be included- Returns:
- the new
ArangoIterable
-
first
T first()
Returns the first element ornullif no element exists.- Returns:
- first element or
null
-
count
long count()
Returns the count of elements of thisArangoIterable.- Returns:
- the count of elements
-
anyMatch
boolean anyMatch(Predicate<? super T> predicate)
Returns whether any elements of thisArangoIterablematch the provided predicate.- Parameters:
predicate- a predicate to apply to elements of thisArangoIterable- Returns:
trueif any elements of theArangoIterablematch the provided predicate, otherwisefalse
-
allMatch
boolean allMatch(Predicate<? super T> predicate)
Returns whether all elements of thisArangoIterablematch the provided predicate.- Parameters:
predicate- a predicate to apply to elements of thisArangoIterable- Returns:
trueif all elements of theArangoIterablematch the provided predicate, otherwisefalse
-
noneMatch
boolean noneMatch(Predicate<? super T> predicate)
Returns whether no elements of thisArangoIterablematch the provided predicate.- Parameters:
predicate- a predicate to apply to elements of thisArangoIterable- Returns:
trueif no elements of theArangoIterablematch the provided predicate, otherwisefalse
-
collectInto
<R extends Collection<? super T>> R collectInto(R target)
Iterates over all elements of thisArangoIterableand adds each to the given target.- Parameters:
target- the collection to insert into- Returns:
- the filled target
-
-