Class EmptyQuery<R>

  • All Implemented Interfaces:
    Query<R>, Iterable<R>

    public class EmptyQuery<R>
    extends Object
    implements Query<R>
    Author:
    max
    • Constructor Detail

      • EmptyQuery

        public EmptyQuery()
    • Method Detail

      • findAll

        @NotNull
        public Collection<R> findAll()
        Description copied from interface: Query
        Get all of the results in the Collection
        Specified by:
        findAll in interface Query<R>
        Returns:
        results in a collection or empty collection if no results found.
      • findFirst

        public R findFirst()
        Description copied from interface: Query
        Get the first result or null if no results have been found.
        Specified by:
        findFirst in interface Query<R>
        Returns:
        first result of the search or null if no results.
      • forEach

        public boolean forEach​(@NotNull
                               Processor<R> consumer)
        Description copied from interface: Query
        Process search results one-by-one. All the results will be subsequently fed to a consumer passed.
        Specified by:
        forEach in interface Query<R>
        Parameters:
        consumer - - a processor search results should be fed to.
        Returns:
        true if the search was completed normally, false if the occurrence processing was cancelled by the processor.
      • toArray

        public R[] toArray​(R[] a)
        Specified by:
        toArray in interface Query<R>
      • getEmptyQuery

        public static <T> Query<T> getEmptyQuery()