Type - the type of the contained itemspublic interface IQueryable<Type> extends IContainer<Type>
| Modifier and Type | Method and Description |
|---|---|
boolean |
any()
Check if this IQueryable contains any elements.
|
boolean |
anyMatch(java.util.function.Predicate<? super Type> predicate)
Returns whether any elements of this IQueryable match the provided predicate.
|
int |
count()
Return the number of elements in this IQueryable
|
int |
count(java.util.function.Predicate<Type> predicate)
Return number of elements in this queryable that passes the given predicate.
|
IQueryable<Type> |
distinct()
Returns an queryable consisting of the distinct elements (according to Object.equals(Object)) of this queryable.
|
IQueryable<Type> |
filter(java.util.function.Predicate<Type> predicate)
Returns an IQueryable consisting of the elements of this IQueryable that match the given predicate.
|
Optional<Type> |
findFirst()
Returns the first item in this IQueryable if exists
|
Optional<Type> |
findFirst(java.util.function.Predicate<Type> predicate)
Returns the first item in this IQueryable if exists
|
Type |
first()
Returns the first item in this IQueryable
|
Type |
first(java.util.function.Predicate<Type> predicate)
Returns the first item in this IQueryable
|
Type |
last()
Returns the last item in this IQueryable
|
<Out> IQueryable<Out> |
map(java.util.function.Function<Type,Out> mapper)
Returns a IQueryable consisting of the results of applying the given function to the elements of this IQueryable
This is an intermediate operation.
|
<Out> IQueryable<Out> |
mapMany(java.util.function.Function<Type,Iterable<Out>> mapper)
Returns a IQueryable consisting of the results of applying the given function to the elements of this IQueryable
This is an intermediate operation.
|
IQueryable<Type> |
sorted()
Returns a queryalbe consisting of the elements of this queryalbe, sorted according to natural order.
|
IQueryable<Type> |
sorted(Comparator<? super Type> comparator)
Returns a queryalbe consisting of the elements of this queryalbe, sorted according to the provided Comparator.
|
Type[] |
toArray(java.util.function.IntFunction<Type[]> generator)
Returns an array containing the elements of this IQueryable.
|
containsforEach, iterator, spliteratorIQueryable<Type> filter(java.util.function.Predicate<Type> predicate)
predicate - a non-interfering, stateless predicate to apply to each element to determine if it should be included<Out> IQueryable<Out> map(java.util.function.Function<Type,Out> mapper)
Out - the result of mapping the original typemapper - a non-interfering, stateless function to apply to each element<Out> IQueryable<Out> mapMany(java.util.function.Function<Type,Iterable<Out>> mapper)
Out - the result of mapping the original typemapper - a non-interfering, stateless function to apply to each elementboolean any()
boolean anyMatch(java.util.function.Predicate<? super Type> predicate)
predicate - a non-interfering, stateless predicate to apply to elements of this queryable.int count()
int count(java.util.function.Predicate<Type> predicate)
predicate - a non-interfering, stateless predicate to apply to elements of this queryable.Type first()
Type first(java.util.function.Predicate<Type> predicate)
predicate - a non-interfering, stateless predicate to apply to elements of this streamOptional<Type> findFirst()
Optional<Type> findFirst(java.util.function.Predicate<Type> predicate)
predicate - a non-interfering, stateless predicate to apply to elements of this streamType last()
Type[] toArray(java.util.function.IntFunction<Type[]> generator)
generator - function that generates a new array of the given type and sizeIQueryable<Type> sorted()
IQueryable<Type> sorted(Comparator<? super Type> comparator)
comparator - comparator - a non-interfering, stateless Comparator to be used to compare queryalbe elementsIQueryable<Type> distinct()
Copyright © 2015. All rights reserved.