Class MergeQuery<T,​T1 extends T,​T2 extends T>

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

    public class MergeQuery<T,​T1 extends T,​T2 extends T>
    extends Object
    implements Query<T>
    • Constructor Detail

      • MergeQuery

        public MergeQuery​(Query<T1> query1,
                          Query<T2> query2)
    • Method Detail

      • findAll

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

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

        public boolean forEach​(@NotNull
                               Processor<T> 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<T>
        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 T[] toArray​(T[] a)
        Specified by:
        toArray in interface Query<T>