Package com.intellij.util
Interface Query<Result>
-
- All Superinterfaces:
Iterable<Result>
- All Known Implementing Classes:
ArrayQuery,CollectionQuery,EmptyQuery,LazyQuery,MergeQuery
public interface Query<Result> extends Iterable<Result>
- Author:
- max
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<Result>findAll()Get all of the results in theCollectionResultfindFirst()Get the first result ornullif no results have been found.booleanforEach(Processor<Result> consumer)Process search results one-by-one.Result[]toArray(Result[] a)-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
findAll
@NotNull Collection<Result> findAll()
Get all of the results in theCollection- Returns:
- results in a collection or empty collection if no results found.
-
findFirst
@Nullable Result findFirst()
Get the first result ornullif no results have been found.- Returns:
- first result of the search or
nullif no results.
-
forEach
boolean forEach(@NotNull Processor<Result> consumer)Process search results one-by-one. All the results will be subsequently fed to aconsumerpassed.- Parameters:
consumer- - a processor search results should be fed to.- Returns:
trueif the search was completed normally,falseif the occurrence processing was cancelled by the processor.
-
-