按字母顺序的操作符列表
优质
小牛编辑
127浏览
2023-12-01
按字母顺序排列的全部操作符列表
aggregate( )
— seereduce( )
all( )
— determine whether all items emitted by an Observable meet some criteriaamb( )
— given two or more source Observables, emits all of the items from the first of these Observables to emit an itemambWith( )
— instance version ofamb( )
and( )
— combine the emissions from two or more source Observables into aPattern
(rxjava-joins
)apply( )
(scala) — seecreate( )
asObservable( )
(kotlin) — seefrom( )
(et al.)asyncAction( )
— convert an Action into an Observable that executes the Action and emits its return value (rxjava-async
)asyncFunc( )
— convert a function into an Observable that executes the function and emits its return value (rxjava-async
)averageDouble( )
— calculates the average of Doubles emitted by an Observable and emits this average (rxjava-math
)averageFloat( )
— calculates the average of Floats emitted by an Observable and emits this average (rxjava-math
)averageInteger( )
— calculates the average of Integers emitted by an Observable and emits this average (rxjava-math
)averageLong( )
— calculates the average of Longs emitted by an Observable and emits this average (rxjava-math
)blocking( )
(clojure) — seetoBlocking( )
buffer( )
— periodically gather items from an Observable into bundles and emit these bundles rather than emitting the items one at a timebyLine( )
(StringObservable
) — converts an Observable of Strings into an Observable of Lines by treating the source sequence as a stream and splitting it on line-endingscache( )
— remember the sequence of items emitted by the Observable and emit the same sequence to future Subscriberscast( )
— cast all items from the source Observable into a particular type before reemitting themcatch( )
(clojure) — seeonErrorResumeNext( )
chunkify( )
— returns an iterable that periodically returns a list of items emitted by the source Observable since the last list (⁇)collect( )
— collects items emitted by the source Observable into a single mutable data structure and returns an Observable that emits this structurecombineLatest( )
— when an item is emitted by either of two Observables, combine the latest item emitted by each Observable via a specified function and emit items based on the results of this functioncombineLatestWith( )
(scala) — instance version ofcombineLatest( )
concat( )
— concatenate two or more Observables sequentiallyconcatMap( )
— transform the items emitted by an Observable into Observables, then flatten this into a single Observable, without interleavingconcatWith( )
— instance version ofconcat( )
connect( )
— instructs a Connectable Observable to begin emitting itemscons( )
(clojure) — seeconcat( )
contains( )
— determine whether an Observable emits a particular item or notcount( )
— counts the number of items emitted by an Observable and emits this countcountLong( )
— counts the number of items emitted by an Observable and emits this countcreate( )
— create an Observable from scratch by means of a functioncycle( )
(clojure) — seerepeat( )
debounce( )
— only emit an item from the source Observable after a particular timespan has passed without the Observable emitting any other itemsdecode( )
(StringObservable
) — convert a stream of multibyte characters into an Observable that emits byte arrays that respect character boundariesdefaultIfEmpty( )
— emit items from the source Observable, or emit a default item if the source Observable completes after emitting no itemsdefer( )
— do not create the Observable until a Subscriber subscribes; create a fresh Observable on each subscriptiondeferFuture( )
— convert a Future that returns an Observable into an Observable, but do not attempt to get the Observable that the Future returns until a Subscriber subscribes (rxjava-async
)deferCancellableFuture( )
— convert a Future that returns an Observable into an Observable in a way that monitors the subscription status of the Observable to determine whether to halt work on the Future, but do not attempt to get the returned Observable until a Subscriber subscribes (⁇)(rxjava-async
)delay( )
— shift the emissions from an Observable forward in time by a specified amountdematerialize( )
— convert a materialized Observable back into its non-materialized formdistinct( )
— suppress duplicate items emitted by the source ObservabledistinctUntilChanged( )
— suppress duplicate consecutive items emitted by the source Observabledo( )
(clojure) — seedoOnEach( )
doOnCompleted( )
— register an action to take when an Observable completes successfullydoOnEach( )
— register an action to take whenever an Observable emits an itemdoOnError( )
— register an action to take when an Observable completes with an errordoOnNext( )
— seedoOnEach( )
doOnRequest( )
— register an action to take when items are requested from an Observable via reactive-pull backpressure (⁇)doOnSubscribe( )
— register an action to take when an observer subscribes to an ObservabledoOnTerminate( )
— register an action to take when an Observable completes, either successfully or with an errordoOnUnsubscribe( )
— register an action to take when an observer unsubscribes from an ObservabledoWhile( )
— emit the source Observable’s sequence, and then repeat the sequence as long as a condition remains true (contrib-computation-expressions
)drop( )
(scala/clojure) — seeskip( )
dropRight( )
(scala) — seeskipLast( )
dropUntil( )
(scala) — seeskipUntil( )
dropWhile( )
(scala) — seeskipWhile( )
drop-while( )
(clojure) — seeskipWhile( )
elementAt( )
— emit item n emitted by the source ObservableelementAtOrDefault( )
— emit item n emitted by the source Observable, or a default item if the source Observable emits fewer than n itemsempty( )
— create an Observable that emits nothing and then completesencode( )
(StringObservable
) — transform an Observable that emits strings into an Observable that emits byte arrays that respect character boundaries of multibyte characters in the original stringserror( )
— create an Observable that emits nothing and then signals an errorevery( )
(clojure) — seeall( )
exists( )
— determine whether an Observable emits any items or notfilter( )
— filter items emitted by an Observablefinally( )
(clojure) — seefinallyDo( )
filterNot( )
(scala) — seefilter( )
finallyDo( )
— register an action to take when an Observable completesfirst( )
(Observable
) — emit only the first item emitted by an Observable, or the first item that meets some conditionfirst( )
(BlockingObservable
) — emit only the first item emitted by an Observable, or the first item that meets some conditionfirstOrDefault( )
(Observable
) — emit only the first item emitted by an Observable, or the first item that meets some condition, or a default value if the source Observable is emptyfirstOrDefault( )
(BlockingObservable
) — emit only the first item emitted by an Observable, or the first item that meets some condition, or a default value if the source Observable is emptyfirstOrElse( )
(scala) — seefirstOrDefault( )
orfirstOrDefault( )
(BlockingObservable
)flatMap( )
— transform the items emitted by an Observable into Observables, then flatten this into a single ObservableflatMapIterable( )
— create Iterables corresponding to each emission from a source Observable and merge the results into a single ObservableflatMapIterableWith( )
(scala) — instance version offlatMapIterable( )
flatMapWith( )
(scala) — instance version offlatmap( )
flatten( )
(scala) — seemerge( )
flattenDelayError( )
(scala) — seemergeDelayError( )
foldLeft( )
(scala) — seereduce( )
forall( )
(scala) — seeall( )
forEach( )
(Observable
) — seesubscribe( )
forEach( )
(BlockingObservable
) — invoke a function on each item emitted by the Observable; block until the Observable completesforEachFuture( )
(Async
) — pass Subscriber methods to an Observable but also have it behave like a Future that blocks until it completes (rxjava-async
)forEachFuture( )
(BlockingObservable
)— create a futureTask that will invoke a specified function on each item emitted by an Observable (⁇)forIterable( )
— apply a function to the elements of an Iterable to create Observables which are then concatenated (⁇)from( )
— convert an Iterable, a Future, or an Array into an Observablefrom( )
(StringObservable
) — convert a stream of characters or a Reader into an Observable that emits byte arrays or StringsfromAction( )
— convert an Action into an Observable that invokes the action and emits its result when a Subscriber subscribes (rxjava-async
)fromCallable( )
— convert a Callable into an Observable that invokes the callable and emits its result or exception when a Subscriber subscribes (rxjava-async
)fromCancellableFuture( )
— convert a Future into an Observable in a way that monitors the subscription status of the Observable to determine whether to halt work on the Future, but do not attempt to get the Future’s value until a Subscriber subscribes (⁇)(rxjava-async
)fromFunc0( )
— seefromCallable( )
(rxjava-async
)fromFuture( )
— convert a Future into an Observable, but do not attempt to get the Future’s value until a Subscriber subscribes (⁇)fromRunnable( )
— convert a Runnable into an Observable that invokes the runable and emits its result when a Subscriber subscribes (rxjava-async
)generate( )
— create an Observable that emits a sequence of items as generated by a function of your choosing (⁇)generateAbsoluteTime( )
— create an Observable that emits a sequence of items as generated by a function of your choosing, with each item emitted at an item-specific time (⁇)generator( )
(clojure) — seegenerate( )
getIterator( )
— convert the sequence emitted by the Observable into an IteratorgroupBy( )
— divide an Observable into a set of Observables that emit groups of items from the original Observable, organized by keygroup-by( )
(clojure) — seegroupBy( )
groupByUntil( )
— a variant of thegroupBy( )
operator that closes any open GroupedObservable upon a signal from another Observable (⁇)groupJoin( )
— combine the items emitted by two Observables whenever one item from one Observable falls within a window of duration specified by an item emitted by the other Observablehead( )
(scala) — seefirst( )
(BlockingObservable
)headOption( )
(scala) — seefirstOrDefault( )
orfirstOrDefault( )
(BlockingObservable
)headOrElse( )
(scala) — seefirstOrDefault( )
orfirstOrDefault( )
(BlockingObservable
)ifThen( )
— only emit the source Observable’s sequence if a condition is true, otherwise emit an empty or default sequence (contrib-computation-expressions
)ignoreElements( )
— discard the items emitted by the source Observable and only pass through the error or completed notificationinterval( )
— create an Observable that emits a sequence of integers spaced by a given time intervalinto( )
(clojure) — seereduce( )
isEmpty( )
— determine whether an Observable emits any items or notitems( )
(scala) — seejust( )
join( )
— combine the items emitted by two Observables whenever one item from one Observable falls within a window of duration specified by an item emitted by the other Observablejoin( )
(StringObservable
) — converts an Observable that emits a sequence of strings into an Observable that emits a single string that concatenates them all, separating them by a specified stringjust( )
— convert an object into an Observable that emits that objectlast( )
(BlockingObservable
) — block until the Observable completes, then return the last item emitted by the Observablelast( )
(Observable
) — emit only the last item emitted by the source ObservablelastOption( )
(scala) — seelastOrDefault( )
orlastOrDefault( )
(BlockingObservable
)lastOrDefault( )
(BlockingObservable
) — block until the Observable completes, then return the last item emitted by the Observable or a default item if there is no last itemlastOrDefault( )
(Observable
) — emit only the last item emitted by an Observable, or a default value if the source Observable is emptylastOrElse( )
(scala) — seelastOrDefault( )
orlastOrDefault( )
(BlockingObservable
)latest( )
— returns an iterable that blocks until or unless the Observable emits an item that has not been returned by the iterable, then returns the latest such itemlength( )
(scala) — seecount( )
limit( )
— seetake( )
longCount( )
(scala) — seecountLong( )
map( )
— transform the items emitted by an Observable by applying a function to each of themmapcat( )
(clojure) — seeconcatMap( )
mapMany( )
— see:flatMap( )
materialize( )
— convert an Observable into a list of Notificationsmax( )
— emits the maximum value emitted by a source Observable (rxjava-math
)maxBy( )
— emits the item emitted by the source Observable that has the maximum key value (rxjava-math
)merge( )
— combine multiple Observables into onemergeDelayError( )
— combine multiple Observables into one, allowing error-free Observables to continue before propagating errorsmerge-delay-error( )
(clojure) — seemergeDelayError( )
mergeMap( )
— _see: [*flatMap( )
]mergeMapIterable( )
— see:flatMapIterable( )
mergeWith( )
— instance version ofmerge( )
min( )
— emits the minimum value emitted by a source Observable (rxjava-math
)minBy( )
— emits the item emitted by the source Observable that has the minimum key value (rxjava-math
)mostRecent( )
— returns an iterable that always returns the item most recently emitted by the Observablemulticast( )
— represents an Observable as a Connectable Observablenever( )
— create an Observable that emits nothing at allnext( )
— returns an iterable that blocks until the Observable emits another item, then returns that itemnonEmpty( )
(scala) — seeisEmpty( )
nth( )
(clojure) — seeelementAt( )
andelementAtOrDefault( )
observeOn( )
— specify on which Scheduler a Subscriber should observe the ObservableofType( )
— emit only those items from the source Observable that are of a particular classonBackpressureBlock( )
— block the Observable’s thread until the Observer is ready to accept more items from the Observable (⁇)onBackpressureBuffer( )
— maintain a buffer of all emissions from the source Observable and emit them to downstream Subscribers according to the requests they generateonBackpressureDrop( )
— drop emissions from the source Observable unless there is a pending request from a downstream Subscriber, in which case emit enough items to fulfill the requestonErrorFlatMap( )
— instructs an Observable to emit a sequence of items whenever it encounters an error (⁇)onErrorResumeNext( )
— instructs an Observable to emit a sequence of items if it encounters an erroronErrorReturn( )
— instructs an Observable to emit a particular item when it encounters an erroronExceptionResumeNext( )
— instructs an Observable to continue emitting items after it encounters an exception (but not another variety of throwable)orElse( )
(scala) — seedefaultIfEmpty( )
parallel( )
— split the work done on the emissions from an Observable into multiple Observables each operating on its own parallel thread (⁇)parallelMerge( )
— combine multiple Observables into smaller number of Observables (⁇)pivot( )
— combine multiple sets of grouped observables so that they are arranged primarily by group rather than by set (⁇)publish( )
— represents an Observable as a Connectable ObservablepublishLast( )
— represent an Observable as a Connectable Observable that emits only the last item emitted by the source Observable (⁇)range( )
— create an Observable that emits a range of sequential integersreduce( )
— apply a function to each emitted item, sequentially, and emit only the final accumulated valuereductions( )
(clojure) — seescan( )
refCount( )
— makes a Connectable Observable behave like an ordinary Observablerepeat( )
— create an Observable that emits a particular item or sequence of items repeatedlyrepeatWhen( )
— create an Observable that emits a particular item or sequence of items repeatedly, depending on the emissions of a second Observablereplay( )
— ensures that all Subscribers see the same sequence of emitted items, even if they subscribe after the Observable begins emitting the itemsrest( )
(clojure) — seenext( )
return( )
(clojure) — seejust( )
retry( )
— if a source Observable emits an error, resubscribe to it in the hopes that it will complete without errorretrywhen( )
— if a source Observable emits an error, pass that error to another Observable to determine whether to resubscribe to the sourcerunAsync( )
— returns aStoppableObservable
that emits multiple actions as generated by a specified Action on a Scheduler (rxjava-async
)sample( )
— emit the most recent items emitted by an Observable within periodic time intervalsscan( )
— apply a function to each item emitted by an Observable, sequentially, and emit each successive valueseq( )
(clojure) — seegetIterator( )
sequenceEqual( )
— test the equality of sequences emitted by two ObservablessequenceEqualWith( )
(scala) — instance version ofsequenceEqual( )
serialize( )
— force an Observable to make serialized calls and to be well-behavedshare( )
— seerefCount( )
single( )
(BlockingObservable
) — if the source Observable completes after emitting a single item, return that item, otherwise throw an exceptionsingle( )
(Observable
) — if the source Observable completes after emitting a single item, emit that item, otherwise notify of an exceptionsingleOption( )
(scala) — seesingleOrDefault( )
(BlockingObservable
)singleOrDefault( )
(BlockingObservable
) — if the source Observable completes after emitting a single item, return that item, otherwise return a default itemsingleOrDefault( )
(Observable
) — if the source Observable completes after emitting a single item, emit that item, otherwise emit a default itemsingleOrElse( )
(scala) — seesingleOrDefault( )
size( )
(scala) — seecount( )
skip( )
— ignore the first n items emitted by an ObservableskipLast( )
— ignore the last n items emitted by an ObservableskipUntil( )
— discard items emitted by a source Observable until a second Observable emits an item, then emit the remainder of the source Observable’s itemsskipWhile( )
— discard items emitted by an Observable until a specified condition is false, then emit the remaindersliding( )
(scala) — seewindow( )
slidingBuffer( )
(scala) — seebuffer( )
split( )
(StringObservable
) — converts an Observable of Strings into an Observable of Strings that treats the source sequence as a stream and splits it on a specified regex boundarystart( )
— create an Observable that emits the return value of a function (rxjava-async
)startCancellableFuture( )
— convert a function that returns Future into an Observable that emits that Future’s return value in a way that monitors the subscription status of the Observable to determine whether to halt work on the Future (⁇)(rxjava-async
)startFuture( )
— convert a function that returns Future into an Observable that emits that Future’s return value (rxjava-async
)startWith( )
— emit a specified sequence of items before beginning to emit the items from the ObservablestringConcat( )
(StringObservable
) — converts an Observable that emits a sequence of strings into an Observable that emits a single string that concatenates them allsubscribeOn( )
— specify which Scheduler an Observable should use when its subscription is invokedsumDouble( )
— adds the Doubles emitted by an Observable and emits this sum (rxjava-math
)sumFloat( )
— adds the Floats emitted by an Observable and emits this sum (rxjava-math
)sumInteger( )
— adds the Integers emitted by an Observable and emits this sum (rxjava-math
)sumLong( )
— adds the Longs emitted by an Observable and emits this sum (rxjava-math
)switch( )
(scala) — seeswitchOnNext( )
switchCase( )
— emit the sequence from a particular Observable based on the results of an evaluation (contrib-computation-expressions
)switchMap( )
— transform the items emitted by an Observable into Observables, and mirror those items emitted by the most-recently transformed ObservableswitchOnNext( )
— convert an Observable that emits Observables into a single Observable that emits the items emitted by the most-recently emitted of those Observablessynchronize( )
— seeserialize( )
take( )
— emit only the first n items emitted by an ObservabletakeFirst( )
— emit only the first item emitted by an Observable, or the first item that meets some conditiontakeLast( )
— only emit the last n items emitted by an ObservabletakeLastBuffer( )
— emit the last n items emitted by an Observable, as a single list itemtakeRight( )
(scala) — seelast( )
(Observable
) ortakeLast( )
takeUntil( )
— emits the items from the source Observable until a second Observable emits an itemtakeWhile( )
— emit items emitted by an Observable as long as a specified condition is true, then skip the remaindertake-while( )
(clojure) — seetakeWhile( )
then( )
— transform a series ofPattern
objects via aPlan
template (rxjava-joins
)throttleFirst( )
— emit the first items emitted by an Observable within periodic time intervalsthrottleLast( )
— emit the most recent items emitted by an Observable within periodic time intervalsthrottleWithTimeout( )
— only emit an item from the source Observable after a particular timespan has passed without the Observable emitting any other itemsthrow( )
(clojure) — seeerror( )
timeInterval( )
— emit the time lapsed between consecutive emissions of a source Observabletimeout( )
— emit items from a source Observable, but issue an exception if no item is emitted in a specified timespantimer( )
— create an Observable that emits a single item after a given delaytimestamp( )
— attach a timestamp to every item emitted by an ObservabletoAsync( )
— convert a function or Action into an Observable that executes the function and emits its return value (rxjava-async
)toBlocking( )
— transform an Observable into a BlockingObservabletoBlockingObservable( )
- seetoBlocking( )
toFuture( )
— convert the Observable into a FuturetoIterable( )
— convert the sequence emitted by the Observable into an IterabletoIterator( )
— seegetIterator( )
toList( )
— collect all items from an Observable and emit them as a single ListtoMap( )
— convert the sequence of items emitted by an Observable into a map keyed by a specified key functiontoMultimap( )
— convert the sequence of items emitted by an Observable into an ArrayList that is also a map keyed by a specified key functiontoSeq( )
(scala) — seetoList( )
toSortedList( )
— collect all items from an Observable and emit them as a single, sorted Listtumbling( )
(scala) — seewindow( )
tumblingBuffer( )
(scala) — seebuffer( )
using( )
— create a disposable resource that has the same lifespan as an Observablewhen( )
— convert a series ofPlan
objects into an Observable (rxjava-joins
)where( )
— see:filter( )
whileDo( )
— if a condition is true, emit the source Observable’s sequence and then repeat the sequence as long as the condition remains true (contrib-computation-expressions
)window( )
— periodically subdivide items from an Observable into Observable windows and emit these windows rather than emitting the items one at a timezip( )
— combine sets of items emitted by two or more Observables together via a specified function and emit items based on the results of this functionzipWith( )
— instance version ofzip( )
zipWithIndex( )
(scala) — seezip( )
++
(scala) — seeconcat( )
+:
(scala) — seestartWith( )
(⁇) — 表示这个操作符不是RxJava 1.0.0核心模块的组成部分