类 Query<T>

    • 构造器概要

      构造器 
      构造器 说明
      Query()  
    • 方法概要

      所有方法 静态方法 实例方法 抽象方法 具体方法 
      修饰符和类型 方法 说明
      void blockingSubscribe()  
      Query<T> distinct()
      Returns a query consisting of the distinct elements (according to Object.equals(Object)) of this query.
      Query<T> filter​(Predicate<? super T> p)
      Returns an asynchronous query consisting of the elements of this query that match the given predicate.
      <R> Query<R> flatMapConcat​(Function<? super T,​? extends Query<? extends R>> mapper)
      Returns an asynchronous query consisting of the results of replacing each element of this query with the contents of a mapped query produced by applying the provided mapping function to each element.
      <R> Query<R> flatMapMerge​(Function<? super T,​? extends Query<? extends R>> mapper)  
      static <U> Query<U> fork​(U[] data)
      Returns an asynchronous sequential ordered query whose elements are the specified values in data parameter running on thread pool.
      <R> Query<R> map​(Function<? super T,​? extends R> mapper)
      Returns an asynchronous query consisting of the results of applying the given function to the elements of this query.
      static <U> Query<U> of​(Iterator<U> iter)
      Returns an asynchronous sequential ordered query whose elements are the specified values in the Iterator parameter.
      static <U> Query<U> of​(U data)  
      static <U> Query<U> of​(U[] data)
      Returns an asynchronous sequential ordered query whose elements are the specified values in data parameter.
      Query<T> onNext​(BiConsumer<? super T,​? super Throwable> action)
      Returns a new asynchronous query emitting the same items of this query, additionally performing the provided action on each element as elements are consumed from the resulting query.
      Query<T> skip​(int n)
      Returns a new asynchronous query consisting of the remaining elements of this query after discarding the first n elements of the query.
      abstract CompletableFuture<Void> subscribe​(BiConsumer<? super T,​? super Throwable> consumer)  
      Query<T> takeWhile​(Predicate<? super T> predicate)
      Returns a query consisting of the longest prefix of elements taken from this query that match the given predicate.
    • 构造器详细资料

      • Query

        public Query()
    • 方法详细资料

      • of

        public static <U> Query<U> of​(U data)
      • of

        public static <U> Query<U> of​(U[] data)
        Returns an asynchronous sequential ordered query whose elements are the specified values in data parameter.
        类型参数:
        U -
        参数:
        data -
        返回:
      • of

        public static <U> Query<U> of​(Iterator<U> iter)
        Returns an asynchronous sequential ordered query whose elements are the specified values in the Iterator parameter.
        类型参数:
        U -
        参数:
        iter -
        返回:
      • fork

        public static <U> Query<U> fork​(U[] data)
        Returns an asynchronous sequential ordered query whose elements are the specified values in data parameter running on thread pool.
        类型参数:
        U -
        参数:
        data -
        返回:
      • onNext

        public final Query<T> onNext​(BiConsumer<? super T,​? super Throwable> action)
        Returns a new asynchronous query emitting the same items of this query, additionally performing the provided action on each element as elements are consumed from the resulting query.
        参数:
        action -
        返回:
      • skip

        public final Query<T> skip​(int n)
        Returns a new asynchronous query consisting of the remaining elements of this query after discarding the first n elements of the query.
        参数:
        n -
        返回:
      • filter

        public final Query<T> filter​(Predicate<? super T> p)
        Returns an asynchronous query consisting of the elements of this query that match the given predicate.
        参数:
        p -
        返回:
      • map

        public final <R> Query<R> map​(Function<? super T,​? extends R> mapper)
        Returns an asynchronous query consisting of the results of applying the given function to the elements of this query.
        类型参数:
        R -
        参数:
        mapper -
        返回:
      • distinct

        public final Query<T> distinct()
        Returns a query consisting of the distinct elements (according to Object.equals(Object)) of this query.
        返回:
      • takeWhile

        public final Query<T> takeWhile​(Predicate<? super T> predicate)
        Returns a query consisting of the longest prefix of elements taken from this query that match the given predicate.
        参数:
        predicate -
        返回:
      • flatMapConcat

        public final <R> Query<R> flatMapConcat​(Function<? super T,​? extends Query<? extends R>> mapper)
        Returns an asynchronous query consisting of the results of replacing each element of this query with the contents of a mapped query produced by applying the provided mapping function to each element. It waits for the inner flow to complete before starting to collect the next one.
        类型参数:
        R -
        参数:
        mapper -
        返回:
      • flatMapMerge

        public final <R> Query<R> flatMapMerge​(Function<? super T,​? extends Query<? extends R>> mapper)
        类型参数:
        R -
        参数:
        mapper -
        返回:
      • blockingSubscribe

        public final void blockingSubscribe()