Interface FlowableDocBasic<T>
- Type Parameters:
T- the element type of the flow
- All Known Implementing Classes:
AsyncProcessor, BehaviorProcessor, ConnectableFlowable, Flowable, FlowableProcessor, GroupedFlowable, MulticastProcessor, PublishProcessor, ReplayProcessor, UnicastProcessor
Documents a set of operators so that the main Flowable source file is not cluttered.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionFilters items emitted by the currentFlowableby only emitting those that satisfy a specified predicate.Returns aFlowablethat applies a specified function to each item emitted by the currentFlowableand emits the results of these function applications.
-
Method Details
-
map
@CheckReturnValue @NonNull @BackpressureSupport(PASS_THROUGH) @SchedulerSupport("none") <@NonNull R> @NonNull Flowable<R> map(@NonNull @NonNull Function<? super T, ? extends @NonNull R> mapper) Returns aFlowablethat applies a specified function to each item emitted by the currentFlowableand emits the results of these function applications.
- Backpressure:
- The operator doesn't interfere with backpressure which is determined by the current
Flowable's backpressure behavior. - Scheduler:
mapdoes not operate by default on a particularScheduler.
- Type Parameters:
R- the output type- Parameters:
mapper- a function to apply to each item emitted by the currentFlowable- Returns:
- the new
Flowableinstance - Throws:
NullPointerException- ifmapperisnull- See Also:
-
filter
@CheckReturnValue @NonNull @BackpressureSupport(PASS_THROUGH) @SchedulerSupport("none") @NonNull Flowable<T> filter(@NonNull @NonNull Predicate<? super T> predicate) Filters items emitted by the currentFlowableby only emitting those that satisfy a specified predicate.
- Backpressure:
- The operator doesn't interfere with backpressure which is determined by the current
Flowable's backpressure behavior. - Scheduler:
filterdoes not operate by default on a particularScheduler.
- Parameters:
predicate- a function that evaluates each item emitted by the currentFlowable, returningtrueif it passes the filter- Returns:
- the new
Flowableinstance - Throws:
NullPointerException- ifpredicateisnull- See Also:
-