Adds `seealso` references to `reactivex.io`.
This commit is contained in:
parent
8d0f514b6d
commit
ecdf0a9898
|
|
@ -17,6 +17,8 @@ import Foundation
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
|
||||
|
||||
- seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
@ -94,6 +96,8 @@ class CombineLatest2<E1, E2, R> : Producer<R> {
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
|
||||
|
||||
- seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
@ -178,6 +182,8 @@ class CombineLatest3<E1, E2, E3, R> : Producer<R> {
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
|
||||
|
||||
- seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
@ -269,6 +275,8 @@ class CombineLatest4<E1, E2, E3, E4, R> : Producer<R> {
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
|
||||
|
||||
- seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
@ -367,6 +375,8 @@ class CombineLatest5<E1, E2, E3, E4, E5, R> : Producer<R> {
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
|
||||
|
||||
- seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
@ -472,6 +482,8 @@ class CombineLatest6<E1, E2, E3, E4, E5, E6, R> : Producer<R> {
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
|
||||
|
||||
- seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
@ -584,6 +596,8 @@ class CombineLatest7<E1, E2, E3, E4, E5, E6, E7, R> : Producer<R> {
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
|
||||
|
||||
- seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ import Foundation
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
|
||||
|
||||
- seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ import Foundation
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
|
||||
|
||||
- seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
@ -106,6 +108,8 @@ class Zip2<E1, E2, R> : Producer<R> {
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
|
||||
|
||||
- seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
@ -203,6 +207,8 @@ class Zip3<E1, E2, E3, R> : Producer<R> {
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
|
||||
|
||||
- seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
@ -308,6 +314,8 @@ class Zip4<E1, E2, E3, E4, R> : Producer<R> {
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
|
||||
|
||||
- seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
@ -421,6 +429,8 @@ class Zip5<E1, E2, E3, E4, E5, R> : Producer<R> {
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
|
||||
|
||||
- seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
@ -542,6 +552,8 @@ class Zip6<E1, E2, E3, E4, E5, E6, R> : Producer<R> {
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
|
||||
|
||||
- seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
@ -671,6 +683,8 @@ class Zip7<E1, E2, E3, E4, E5, E6, E7, R> : Producer<R> {
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
|
||||
|
||||
- seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ import Foundation
|
|||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
|
||||
|
||||
- seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ extension ObservableType {
|
|||
|
||||
For aggregation behavior with incremental intermediate results, see `scan`.
|
||||
|
||||
- seealso: [reduce operator on reactivex.io](http://reactivex.io/documentation/operators/reduce.html)
|
||||
|
||||
- parameter seed: The initial accumulator value.
|
||||
- parameter accumulator: A accumulator function to be invoked on each element.
|
||||
- parameter mapResult: A function to transform the final accumulator value into the result value.
|
||||
|
|
@ -38,6 +40,8 @@ extension ObservableType {
|
|||
Applies an `accumulator` function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified `seed` value is used as the initial accumulator value.
|
||||
|
||||
For aggregation behavior with incremental intermediate results, see `scan`.
|
||||
|
||||
- seealso: [reduce operator on reactivex.io](http://reactivex.io/documentation/operators/reduce.html)
|
||||
|
||||
- parameter seed: The initial accumulator value.
|
||||
- parameter accumulator: A accumulator function to be invoked on each element.
|
||||
|
|
@ -53,6 +57,8 @@ extension ObservableType {
|
|||
Converts an Observable into another Observable that emits the whole sequence as a single array and then terminates.
|
||||
|
||||
For aggregation behavior see `reduce`.
|
||||
|
||||
- seealso: [toArray operator on reactivex.io](http://reactivex.io/documentation/operators/to.html)
|
||||
|
||||
- returns: An observable sequence containing all the emitted elements as array.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ extension ObservableType {
|
|||
Upon connection of the connectable observable, the subject is subscribed to the source exactly one, and messages are forwarded to the observers registered with the connectable observable.
|
||||
|
||||
For specializations with fixed subject types, see `publish` and `replay`.
|
||||
|
||||
- seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html)
|
||||
|
||||
- parameter subject: Subject to push source elements into.
|
||||
- returns: A connectable observable sequence that upon connection causes the source sequence to push results into the specified subject.
|
||||
|
|
@ -34,6 +36,8 @@ extension ObservableType {
|
|||
Each subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's invocation.
|
||||
|
||||
For specializations with fixed subject types, see `publish` and `replay`.
|
||||
|
||||
- seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html)
|
||||
|
||||
- parameter subjectSelector: Factory function to create an intermediate subject through which the source sequence's elements will be multicast to the selector function.
|
||||
- parameter selector: Selector function which can use the multicasted source sequence subject to the policies enforced by the created subject.
|
||||
|
|
@ -58,6 +62,8 @@ extension ObservableType {
|
|||
Returns a connectable observable sequence that shares a single subscription to the underlying sequence.
|
||||
|
||||
This operator is a specialization of `multicast` using a `PublishSubject`.
|
||||
|
||||
- seealso: [publish operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html)
|
||||
|
||||
- returns: A connectable observable sequence that shares a single subscription to the underlying sequence.
|
||||
*/
|
||||
|
|
@ -75,6 +81,8 @@ extension ObservableType {
|
|||
Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize elements.
|
||||
|
||||
This operator is a specialization of `multicast` using a `ReplaySubject`.
|
||||
|
||||
- seealso: [replay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html)
|
||||
|
||||
- parameter bufferSize: Maximum element count of the replay buffer.
|
||||
- returns: A connectable observable sequence that shares a single subscription to the underlying sequence.
|
||||
|
|
@ -89,6 +97,8 @@ extension ObservableType {
|
|||
Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying all elements.
|
||||
|
||||
This operator is a specialization of `multicast` using a `ReplaySubject`.
|
||||
|
||||
- seealso: [replay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html)
|
||||
|
||||
- returns: A connectable observable sequence that shares a single subscription to the underlying sequence.
|
||||
*/
|
||||
|
|
@ -105,6 +115,8 @@ extension ConnectableObservableType {
|
|||
|
||||
/**
|
||||
Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.
|
||||
|
||||
- seealso: [refCount operator on reactivex.io](http://reactivex.io/documentation/operators/refCount.html)
|
||||
|
||||
- returns: An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence.
|
||||
*/
|
||||
|
|
@ -122,7 +134,9 @@ extension ObservableType {
|
|||
Returns an observable sequence that shares a single subscription to the underlying sequence.
|
||||
|
||||
This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
|
||||
|
||||
|
||||
- seealso: [share operator on reactivex.io](http://reactivex.io/documentation/operators/refcount.html)
|
||||
|
||||
- returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
|
||||
*/
|
||||
@warn_unused_result(message="http://git.io/rxs.uo")
|
||||
|
|
@ -139,6 +153,8 @@ extension ObservableType {
|
|||
Returns an observable sequence that shares a single subscription to the underlying sequence, and immediately upon subscription replays maximum number of elements in buffer.
|
||||
|
||||
This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed.
|
||||
|
||||
- seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html)
|
||||
|
||||
- parameter bufferSize: Maximum element count of the replay buffer.
|
||||
- returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
|
||||
|
|
@ -161,6 +177,8 @@ extension ObservableType {
|
|||
|
||||
Unlike `shareReplay(bufferSize: Int)`, this operator will clear latest element from replay buffer in case number of subscribers drops from one to zero. In case sequence
|
||||
completes or errors out replay buffer is also cleared.
|
||||
|
||||
- seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html)
|
||||
|
||||
- returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ extension ObservableType {
|
|||
|
||||
This only invokes observer callbacks on a `scheduler`. In case the subscription and/or unsubscription
|
||||
actions have side-effects that require to be run on a scheduler, use `subscribeOn`.
|
||||
|
||||
- seealso: [observeOn operator on reactivex.io](http://reactivex.io/documentation/operators/observeon.html)
|
||||
|
||||
- parameter scheduler: Scheduler to notify observers on.
|
||||
- returns: The source sequence whose observations happen on the specified scheduler.
|
||||
|
|
@ -46,6 +48,8 @@ extension ObservableType {
|
|||
This only performs the side-effects of subscription and unsubscription on the specified scheduler.
|
||||
|
||||
In order to invoke observer callbacks on a `scheduler`, use `observeOn`.
|
||||
|
||||
- seealso: [subscribeOn operator on reactivex.io](http://reactivex.io/documentation/operators/subscribeon.html)
|
||||
|
||||
- parameter scheduler: Scheduler to perform subscription and unsubscription actions on.
|
||||
- returns: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler.
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ import Foundation
|
|||
/**
|
||||
Creates an observable sequence from a specified subscribe method implementation.
|
||||
|
||||
- seealso: [create operator on reactivex.io](http://reactivex.io/documentation/operators/create.html)
|
||||
|
||||
- parameter subscribe: Implementation of the resulting observable sequence's `subscribe` method.
|
||||
- returns: The observable sequence with the specified implementation for the `subscribe` method.
|
||||
*/
|
||||
|
|
@ -26,6 +28,8 @@ public func create<E>(subscribe: (AnyObserver<E>) -> Disposable) -> Observable<E
|
|||
/**
|
||||
Returns an empty observable sequence, using the specified scheduler to send out the single `Completed` message.
|
||||
|
||||
- seealso: [empty operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html)
|
||||
|
||||
- parameter type: Optional type hint.
|
||||
- returns: An observable sequence with no elements.
|
||||
*/
|
||||
|
|
@ -39,6 +43,8 @@ public func empty<E>(type: E.Type = E.self) -> Observable<E> {
|
|||
/**
|
||||
Returns a non-terminating observable sequence, which can be used to denote an infinite duration.
|
||||
|
||||
- seealso: [never operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html)
|
||||
|
||||
- parameter type: Optional type hint.
|
||||
- returns: An observable sequence whose observers will never get called.
|
||||
*/
|
||||
|
|
@ -52,6 +58,8 @@ public func never<E>(type: E.Type = E.self) -> Observable<E> {
|
|||
/**
|
||||
Returns an observable sequence that contains a single element.
|
||||
|
||||
- seealso: [just operator on reactivex.io](http://reactivex.io/documentation/operators/just.html)
|
||||
|
||||
- parameter element: Single element in the resulting observable sequence.
|
||||
- returns: An observable sequence containing the single specified element.
|
||||
*/
|
||||
|
|
@ -63,6 +71,8 @@ public func just<E>(element: E) -> Observable<E> {
|
|||
/**
|
||||
Returns an observable sequence that contains a single element.
|
||||
|
||||
- seealso: [just operator on reactivex.io](http://reactivex.io/documentation/operators/just.html)
|
||||
|
||||
- parameter element: Single element in the resulting observable sequence.
|
||||
- parameter: Scheduler to send the single element on.
|
||||
- returns: An observable sequence containing the single specified element.
|
||||
|
|
@ -77,6 +87,8 @@ public func just<E>(element: E, scheduler: ImmediateSchedulerType) -> Observable
|
|||
/**
|
||||
This method creates a new Observable instance with a variable number of elements.
|
||||
|
||||
- seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html)
|
||||
|
||||
- parameter elements: Elements to generate.
|
||||
- parameter scheduler: Scheduler to send elements on. If `nil`, elements are sent immediatelly on subscription.
|
||||
- returns: The observable sequence whose elements are pulled from the given arguments.
|
||||
|
|
@ -91,6 +103,8 @@ extension SequenceType {
|
|||
/**
|
||||
Converts a sequence to an observable sequence.
|
||||
|
||||
- seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html)
|
||||
|
||||
- returns: The observable sequence whose elements are pulled from the given enumerable sequence.
|
||||
*/
|
||||
@warn_unused_result(message="http://git.io/rxs.uo")
|
||||
|
|
@ -102,6 +116,8 @@ extension SequenceType {
|
|||
/**
|
||||
Converts a sequence to an observable sequence.
|
||||
|
||||
- seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html)
|
||||
|
||||
- returns: The observable sequence whose elements are pulled from the given enumerable sequence.
|
||||
*/
|
||||
@warn_unused_result(message="http://git.io/rxs.uo")
|
||||
|
|
@ -114,6 +130,8 @@ extension Array {
|
|||
/**
|
||||
Converts a sequence to an observable sequence.
|
||||
|
||||
- seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html)
|
||||
|
||||
- returns: The observable sequence whose elements are pulled from the given enumerable sequence.
|
||||
*/
|
||||
@warn_unused_result(message="http://git.io/rxs.uo")
|
||||
|
|
@ -127,6 +145,8 @@ extension Array {
|
|||
/**
|
||||
Returns an observable sequence that terminates with an `error`.
|
||||
|
||||
- seealso: [throw operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html)
|
||||
|
||||
- parameter type: Optional type hint.
|
||||
- returns: The observable sequence that terminates with specified error.
|
||||
*/
|
||||
|
|
@ -140,6 +160,8 @@ public func failWith<E>(error: ErrorType, _ type: E.Type = E.self) -> Observable
|
|||
/**
|
||||
Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes.
|
||||
|
||||
- seealso: [defer operator on reactivex.io](http://reactivex.io/documentation/operators/defer.html)
|
||||
|
||||
- parameter observableFactory: Observable factory function to invoke for each observer that subscribes to the resulting sequence.
|
||||
- returns: An observable sequence whose observers trigger an invocation of the given observable factory function.
|
||||
*/
|
||||
|
|
@ -153,6 +175,8 @@ public func deferred<E>(observableFactory: () throws -> Observable<E>)
|
|||
Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler
|
||||
to run the loop send out observer messages.
|
||||
|
||||
- seealso: [create operator on reactivex.io](http://reactivex.io/documentation/operators/create.html)
|
||||
|
||||
- parameter initialState: Initial state.
|
||||
- parameter condition: Condition to terminate generation (upon returning `false`).
|
||||
- parameter iterate: Iteration step function.
|
||||
|
|
@ -167,6 +191,8 @@ public func generate<E>(initialState: E, condition: E throws -> Bool, scheduler:
|
|||
/**
|
||||
Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to generate and send out observer messages.
|
||||
|
||||
- seealso: [range operator on reactivex.io](http://reactivex.io/documentation/operators/range.html)
|
||||
|
||||
- parameter start: The value of the first integer in the sequence.
|
||||
- parameter count: The number of sequential integers to generate.
|
||||
- parameter scheduler: Scheduler to run the generator loop on.
|
||||
|
|
@ -185,6 +211,8 @@ public func range(start: Int, _ count: Int, _ scheduler: ImmediateSchedulerType
|
|||
/**
|
||||
Generates an observable sequence that repeats the given element infinitely, using the specified scheduler to send out observer messages.
|
||||
|
||||
- seealso: [repeat operator on reactivex.io](http://reactivex.io/documentation/operators/repeat.html)
|
||||
|
||||
- parameter element: Element to repeat.
|
||||
- parameter scheduler: Scheduler to run the producer loop on.
|
||||
- returns: An observable sequence that repeats the given element infinitely.
|
||||
|
|
@ -201,6 +229,8 @@ public func repeatElement<E>(element: E, _ scheduler: ImmediateSchedulerType) ->
|
|||
|
||||
/**
|
||||
Constructs an observable sequence that depends on a resource object, whose lifetime is tied to the resulting observable sequence's lifetime.
|
||||
|
||||
- seealso: [using operator on reactivex.io](http://reactivex.io/documentation/operators/using.html)
|
||||
|
||||
- parameter resourceFactory: Factory function to obtain a resource object.
|
||||
- parameter observableFactory: Factory function to obtain an observable sequence that depends on the obtained resource.
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Prints received events for all observers on standard output.
|
||||
|
||||
- seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html)
|
||||
|
||||
- parameter identifier: Identifier that is printed together with event description to standard output.
|
||||
- returns: An observable sequence whose events are printed to standard output.
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ extension CollectionType where Generator.Element : ObservableConvertibleType {
|
|||
|
||||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
|
||||
|
||||
- seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
|
|
@ -30,6 +32,8 @@ extension CollectionType where Generator.Element : ObservableConvertibleType {
|
|||
|
||||
/**
|
||||
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
|
||||
|
||||
- seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html)
|
||||
|
||||
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
|
||||
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
|
||||
|
|
@ -50,7 +54,9 @@ extension ObservableType where E : ObservableConvertibleType {
|
|||
|
||||
Each time a new inner observable sequence is received, unsubscribe from the
|
||||
previous inner observable sequence.
|
||||
|
||||
|
||||
- seealso: [switch operator on reactivex.io](http://reactivex.io/documentation/operators/switch.html)
|
||||
|
||||
- returns: The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received.
|
||||
*/
|
||||
@warn_unused_result(message="http://git.io/rxs.uo")
|
||||
|
|
@ -65,6 +71,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Concatenates the second observable sequence to `self` upon successful termination of `self`.
|
||||
|
||||
- seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html)
|
||||
|
||||
- parameter second: Second observable sequence.
|
||||
- returns: An observable sequence that contains the elements of `self`, followed by those of the second sequence.
|
||||
|
|
@ -86,6 +94,8 @@ extension SequenceType where Generator.Element : ObservableConvertibleType {
|
|||
|
||||
[1, [2, [3, .....].concat()].concat].concat()
|
||||
|
||||
- seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html)
|
||||
|
||||
- returns: An observable sequence that contains the elements of each given sequence, in sequential order.
|
||||
*/
|
||||
@warn_unused_result(message="http://git.io/rxs.uo")
|
||||
|
|
@ -106,6 +116,8 @@ extension CollectionType where Generator.Element : ObservableConvertibleType {
|
|||
Optimizations will be performed in cases equivalent to following:
|
||||
|
||||
[1, [2, [3, .....].concat()].concat].concat()
|
||||
|
||||
- seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html)
|
||||
|
||||
- returns: An observable sequence that contains the elements of each given sequence, in sequential order.
|
||||
*/
|
||||
|
|
@ -120,6 +132,8 @@ extension ObservableType where E : ObservableConvertibleType {
|
|||
|
||||
/**
|
||||
Concatenates all inner observable sequences, as long as the previous observable sequence terminated successfully.
|
||||
|
||||
- seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html)
|
||||
|
||||
- returns: An observable sequence that contains the elements of each observed inner sequence, in sequential order.
|
||||
*/
|
||||
|
|
@ -135,6 +149,8 @@ extension ObservableType where E : ObservableConvertibleType {
|
|||
|
||||
/**
|
||||
Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence.
|
||||
|
||||
- seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html)
|
||||
|
||||
- returns: The observable sequence that merges the elements of the observable sequences.
|
||||
*/
|
||||
|
|
@ -145,7 +161,9 @@ extension ObservableType where E : ObservableConvertibleType {
|
|||
|
||||
/**
|
||||
Merges elements from all inner observable sequences into a single observable sequence, limiting the number of concurrent subscriptions to inner sequences.
|
||||
|
||||
|
||||
- seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html)
|
||||
|
||||
- parameter maxConcurrent: Maximum number of inner observable sequences being subscribed to concurrently.
|
||||
- returns: The observable sequence that merges the elements of the inner sequences.
|
||||
*/
|
||||
|
|
@ -162,6 +180,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Continues an observable sequence that is terminated by an error with the observable sequence produced by the handler.
|
||||
|
||||
- seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html)
|
||||
|
||||
- parameter handler: Error handler function, producing another observable sequence.
|
||||
- returns: An observable sequence containing the source sequence's elements, followed by the elements produced by the handler's resulting observable sequence in case an error occurred.
|
||||
|
|
@ -174,6 +194,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Continues an observable sequence that is terminated by an error with a single element.
|
||||
|
||||
- seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html)
|
||||
|
||||
- parameter element: Last element in an observable sequence in case error occurs.
|
||||
- returns: An observable sequence containing the source sequence's elements, followed by the `element` in case an error occurred.
|
||||
|
|
@ -189,6 +211,8 @@ extension ObservableType {
|
|||
extension SequenceType where Generator.Element : ObservableConvertibleType {
|
||||
/**
|
||||
Continues an observable sequence that is terminated by an error with the next observable sequence.
|
||||
|
||||
- seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html)
|
||||
|
||||
- returns: An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully.
|
||||
*/
|
||||
|
|
@ -205,6 +229,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Returns the elements from the source observable sequence until the other observable sequence produces an element.
|
||||
|
||||
- seealso: [takeUntil operator on reactivex.io](http://reactivex.io/documentation/operators/takeuntil.html)
|
||||
|
||||
- parameter other: Observable sequence that terminates propagation of elements of the source sequence.
|
||||
- returns: An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation.
|
||||
|
|
@ -222,6 +248,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Returns the elements from the source observable sequence until the other observable sequence produces an element.
|
||||
|
||||
- seealso: [skipUntil operator on reactivex.io](http://reactivex.io/documentation/operators/skipuntil.html)
|
||||
|
||||
- parameter other: Observable sequence that terminates propagation of elements of the source sequence.
|
||||
- returns: An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation.
|
||||
|
|
@ -239,6 +267,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Propagates the observable sequence that reacts first.
|
||||
|
||||
- seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html)
|
||||
|
||||
- parameter right: Second observable sequence.
|
||||
- returns: An observable sequence that surfaces either of the given sequences, whichever reacted first.
|
||||
|
|
@ -255,6 +285,8 @@ extension SequenceType where Generator.Element : ObservableConvertibleType {
|
|||
|
||||
/**
|
||||
Propagates the observable sequence that reacts first.
|
||||
|
||||
- seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html)
|
||||
|
||||
- returns: An observable sequence that surfaces any of the given sequences, whichever reacted first.
|
||||
*/
|
||||
|
|
@ -273,6 +305,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Merges two observable sequences into one observable sequence by combining each element from self with the latest element from the second source, if any.
|
||||
|
||||
- seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html)
|
||||
|
||||
- parameter second: Second observable source.
|
||||
- parameter resultSelector: Function to invoke for each element from the self combined with the latest element from the second source, if any.
|
||||
|
|
@ -284,6 +318,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Merges two observable sequences into one observable sequence by using latest element from the second sequence every time when `self` emitts an element.
|
||||
|
||||
- seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html)
|
||||
|
||||
- parameter second: Second observable source.
|
||||
- returns: An observable sequence containing the result of combining each element of the self with the latest element from the second source, if any, using the specified result selector function.
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ extension ObservableType where E: Equatable {
|
|||
|
||||
/**
|
||||
Returns an observable sequence that contains only distinct contiguous elements according to equality operator.
|
||||
|
||||
- seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html)
|
||||
|
||||
- returns: An observable sequence only containing the distinct contiguous elements, based on equality operator, from the source sequence.
|
||||
*/
|
||||
|
|
@ -27,6 +29,8 @@ extension ObservableType where E: Equatable {
|
|||
extension ObservableType {
|
||||
/**
|
||||
Returns an observable sequence that contains only distinct contiguous elements according to the `keySelector`.
|
||||
|
||||
- seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html)
|
||||
|
||||
- parameter keySelector: A function to compute the comparison key for each element.
|
||||
- returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence.
|
||||
|
|
@ -39,6 +43,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Returns an observable sequence that contains only distinct contiguous elements according to the `comparer`.
|
||||
|
||||
- seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html)
|
||||
|
||||
- parameter comparer: Equality comparer for computed key values.
|
||||
- returns: An observable sequence only containing the distinct contiguous elements, based on `comparer`, from the source sequence.
|
||||
|
|
@ -51,6 +57,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer.
|
||||
|
||||
- seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html)
|
||||
|
||||
- parameter keySelector: A function to compute the comparison key for each element.
|
||||
- parameter comparer: Equality comparer for computed key values.
|
||||
|
|
@ -69,6 +77,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence.
|
||||
|
||||
- seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html)
|
||||
|
||||
- parameter eventHandler: Action to invoke for each event in the observable sequence.
|
||||
- returns: The source sequence with the side-effecting behavior applied.
|
||||
|
|
@ -81,6 +91,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence.
|
||||
|
||||
- seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html)
|
||||
|
||||
- parameter onNext: Action to invoke for each element in the observable sequence.
|
||||
- parameter onError: Action to invoke upon errored termination of the observable sequence.
|
||||
|
|
@ -109,6 +121,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Prepends a sequence of values to an observable sequence.
|
||||
|
||||
- seealso: [startWith operator on reactivex.io](http://reactivex.io/documentation/operators/startwith.html)
|
||||
|
||||
- parameter elements: Elements to prepend to the specified sequence.
|
||||
- returns: The source sequence prepended with the specified values.
|
||||
|
|
@ -128,6 +142,8 @@ extension ObservableType {
|
|||
Repeats the source observable sequence until it successfully terminates.
|
||||
|
||||
**This could potentially create an infinite sequence.**
|
||||
|
||||
- seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html)
|
||||
|
||||
- returns: Observable sequence to repeat until it successfully terminates.
|
||||
*/
|
||||
|
|
@ -141,6 +157,8 @@ extension ObservableType {
|
|||
|
||||
If you encounter an error and want it to retry once, then you must use `retry(2)`
|
||||
|
||||
- seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html)
|
||||
|
||||
- parameter maxAttemptCount: Maximum number of times to repeat the sequence.
|
||||
- returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully.
|
||||
*/
|
||||
|
|
@ -153,6 +171,8 @@ extension ObservableType {
|
|||
/**
|
||||
Repeats the source observable sequence on error when the notifier emits a next value.
|
||||
If the source observable errors and the notifier completes, it will complete the source sequence.
|
||||
|
||||
- seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html)
|
||||
|
||||
- parameter notificationHandler: A handler that is passed an observable sequence of errors raised by the source observable and returns and observable that either continues, completes or errors. This behavior is then applied to the source observable.
|
||||
- returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully or is notified to error or complete.
|
||||
|
|
@ -166,6 +186,8 @@ extension ObservableType {
|
|||
/**
|
||||
Repeats the source observable sequence on error when the notifier emits a next value.
|
||||
If the source observable errors and the notifier completes, it will complete the source sequence.
|
||||
|
||||
- seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html)
|
||||
|
||||
- parameter notificationHandler: A handler that is passed an observable sequence of errors raised by the source observable and returns and observable that either continues, completes or errors. This behavior is then applied to the source observable.
|
||||
- returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully or is notified to error or complete.
|
||||
|
|
@ -183,8 +205,10 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Applies an accumulator function over an observable sequence and returns each intermediate result. The specified seed value is used as the initial accumulator value.
|
||||
|
||||
|
||||
For aggregation behavior with no intermediate results, see `reduce`.
|
||||
|
||||
- seealso: [scan operator on reactivex.io](http://reactivex.io/documentation/operators/scan.html)
|
||||
|
||||
- parameter seed: The initial accumulator value.
|
||||
- parameter accumulator: An accumulator function to be invoked on each element.
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Filters the elements of an observable sequence based on a predicate.
|
||||
|
||||
- seealso: [filter operator on reactivex.io](http://reactivex.io/documentation/operators/filter.html)
|
||||
|
||||
- parameter predicate: A function to test each source element for a condition.
|
||||
- returns: An observable sequence that contains elements from the input sequence that satisfy the condition.
|
||||
|
|
@ -32,6 +34,8 @@ extension ObservableType {
|
|||
/**
|
||||
Returns elements from an observable sequence as long as a specified condition is true.
|
||||
|
||||
- seealso: [takeWhile operator on reactivex.io](http://reactivex.io/documentation/operators/takewhile.html)
|
||||
|
||||
- parameter predicate: A function to test each element for a condition.
|
||||
- returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes.
|
||||
*/
|
||||
|
|
@ -45,7 +49,9 @@ extension ObservableType {
|
|||
Returns elements from an observable sequence as long as a specified condition is true.
|
||||
|
||||
The element's index is used in the logic of the predicate function.
|
||||
|
||||
|
||||
- seealso: [takeWhile operator on reactivex.io](http://reactivex.io/documentation/operators/takewhile.html)
|
||||
|
||||
- parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element.
|
||||
- returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes.
|
||||
*/
|
||||
|
|
@ -62,6 +68,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Returns a specified number of contiguous elements from the start of an observable sequence.
|
||||
|
||||
- seealso: [take operator on reactivex.io](http://reactivex.io/documentation/operators/take.html)
|
||||
|
||||
- parameter count: The number of elements to return.
|
||||
- returns: An observable sequence that contains the specified number of elements from the start of the input sequence.
|
||||
|
|
@ -86,6 +94,8 @@ extension ObservableType {
|
|||
Returns a specified number of contiguous elements from the end of an observable sequence.
|
||||
|
||||
This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed.
|
||||
|
||||
- seealso: [takeLast operator on reactivex.io](http://reactivex.io/documentation/operators/takelast.html)
|
||||
|
||||
- parameter count: Number of elements to take from the end of the source sequence.
|
||||
- returns: An observable sequence containing the specified number of elements from the end of the source sequence.
|
||||
|
|
@ -104,6 +114,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Bypasses a specified number of elements in an observable sequence and then returns the remaining elements.
|
||||
|
||||
- seealso: [skip operator on reactivex.io](http://reactivex.io/documentation/operators/skip.html)
|
||||
|
||||
- parameter count: The number of elements to skip before returning the remaining elements.
|
||||
- returns: An observable sequence that contains the elements that occur after the specified index in the input sequence.
|
||||
|
|
@ -121,6 +133,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements.
|
||||
|
||||
- seealso: [skipWhile operator on reactivex.io](http://reactivex.io/documentation/operators/skipwhile.html)
|
||||
|
||||
- parameter predicate: A function to test each element for a condition.
|
||||
- returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.
|
||||
|
|
@ -133,6 +147,8 @@ extension ObservableType {
|
|||
/**
|
||||
Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements.
|
||||
The element's index is used in the logic of the predicate function.
|
||||
|
||||
- seealso: [skipWhile operator on reactivex.io](http://reactivex.io/documentation/operators/skipwhile.html)
|
||||
|
||||
- parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element.
|
||||
- returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.
|
||||
|
|
@ -150,7 +166,7 @@ extension ObservableType {
|
|||
/**
|
||||
Projects each element of an observable sequence into a new form.
|
||||
|
||||
[reactivex.io](http://reactivex.io/documentation/operators/map.html)
|
||||
- seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html)
|
||||
|
||||
- parameter selector: A transform function to apply to each source element.
|
||||
- returns: An observable sequence whose elements are the result of invoking the transform function on each element of source.
|
||||
|
|
@ -164,6 +180,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Projects each element of an observable sequence into a new form by incorporating the element's index.
|
||||
|
||||
- seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html)
|
||||
|
||||
- parameter selector: A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
|
||||
- returns: An observable sequence whose elements are the result of invoking the transform function on each element of source.
|
||||
|
|
@ -181,6 +199,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
|
||||
|
||||
- seealso: [flatMap operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html)
|
||||
|
||||
- parameter selector: A transform function to apply to each element.
|
||||
- returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.
|
||||
|
|
@ -193,7 +213,9 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Projects each element of an observable sequence to an observable sequence by incorporating the element's index and merges the resulting observable sequences into one observable sequence.
|
||||
|
||||
|
||||
- seealso: [flatMap operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html)
|
||||
|
||||
- parameter selector: A transform function to apply to each element; the second parameter of the function represents the index of the source element.
|
||||
- returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.
|
||||
*/
|
||||
|
|
@ -212,6 +234,8 @@ extension ObservableType {
|
|||
Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence.
|
||||
If element is received while there is some projected observable sequence being merged it will simply be ignored.
|
||||
|
||||
- seealso: [flatMapFirst operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html)
|
||||
|
||||
- parameter selector: A transform function to apply to element that was observed while no observable is executing in parallel.
|
||||
- returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence that was received while no other sequence was being calculated.
|
||||
*/
|
||||
|
|
@ -231,6 +255,8 @@ extension ObservableType {
|
|||
|
||||
It is a combination of `map` + `switchLatest` operator
|
||||
|
||||
- seealso: [flatMapLatest operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html)
|
||||
|
||||
- parameter selector: A transform function to apply to each element.
|
||||
- returns: An observable sequence whose elements are the result of invoking the transform function on each element of source producing an
|
||||
Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received.
|
||||
|
|
@ -248,6 +274,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Returns a sequence emitting only item _n_ emitted by an Observable
|
||||
|
||||
- seealso: [elementAt operator on reactivex.io](http://reactivex.io/documentation/operators/elementat.html)
|
||||
|
||||
- parameter index: The index of the required item (starting from 0).
|
||||
- returns: An observable sequence that emits the desired item as its own sole emission.
|
||||
|
|
@ -266,6 +294,8 @@ extension ObservableType {
|
|||
/**
|
||||
The single operator is similar to first, but throws a `RxError.NoElements` or `RxError.MoreThanOneElement`
|
||||
if the source Observable does not emit exactly one item before successfully completing.
|
||||
|
||||
- seealso: [single operator on reactivex.io](http://reactivex.io/documentation/operators/first.html)
|
||||
|
||||
- returns: An observable sequence that emits a single item or throws an exception if more (or none) of them are emitted.
|
||||
*/
|
||||
|
|
@ -278,6 +308,8 @@ extension ObservableType {
|
|||
/**
|
||||
The single operator is similar to first, but throws a `RxError.NoElements` or `RxError.MoreThanOneElement`
|
||||
if the source Observable does not emit exactly one item before successfully completing.
|
||||
|
||||
- seealso: [single operator on reactivex.io](http://reactivex.io/documentation/operators/first.html)
|
||||
|
||||
- parameter predicate: A function to test each source element for a condition.
|
||||
- returns: An observable sequence that emits a single item or throws an exception if more (or none) of them are emitted.
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ extension ObservableType {
|
|||
Ignores elements from an observable sequence which are followed by another element within a specified relative time duration, using the specified scheduler to run throttling timers.
|
||||
|
||||
`throttle` and `debounce` are synonyms.
|
||||
|
||||
- seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html)
|
||||
|
||||
- parameter dueTime: Throttling duration for each element.
|
||||
- parameter scheduler: Scheduler to run the throttle timers and send events on.
|
||||
|
|
@ -37,6 +39,8 @@ extension ObservableType {
|
|||
Ignores elements from an observable sequence which are followed by another element within a specified relative time duration, using the specified scheduler to run throttling timers.
|
||||
|
||||
`throttle` and `debounce` are synonyms.
|
||||
|
||||
- seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html)
|
||||
|
||||
- parameter dueTime: Throttling duration for each element.
|
||||
- parameter scheduler: Scheduler to run the throttle timers and send events on.
|
||||
|
|
@ -65,6 +69,8 @@ extension ObservableType {
|
|||
Upon each sampling tick, the latest element (if any) in the source sequence during the last sampling interval is sent to the resulting sequence.
|
||||
|
||||
**In case there were no new elements between sampler ticks, no element is sent to the resulting sequence.**
|
||||
|
||||
- seealso: [sample operator on reactivex.io](http://reactivex.io/documentation/operators/sample.html)
|
||||
|
||||
- parameter sampler: Sampling tick sequence.
|
||||
- returns: Sampled observable sequence.
|
||||
|
|
@ -81,6 +87,8 @@ extension ObservableType {
|
|||
Upon each sampling tick, the latest element (if any) in the source sequence during the last sampling interval is sent to the resulting sequence.
|
||||
|
||||
**In case there were no new elements between sampler ticks, last produced element is always sent to the resulting sequence.**
|
||||
|
||||
- seealso: [sample operator on reactivex.io](http://reactivex.io/documentation/operators/sample.html)
|
||||
|
||||
- parameter sampler: Sampling tick sequence.
|
||||
- returns: Sampled observable sequence.
|
||||
|
|
@ -97,6 +105,8 @@ extension ObservableType {
|
|||
/**
|
||||
Returns an observable sequence that produces a value after each period, using the specified scheduler to run timers and to send out observer messages.
|
||||
|
||||
- seealso: [interval operator on reactivex.io](http://reactivex.io/documentation/operators/interval.html)
|
||||
|
||||
- parameter period: Period for producing the values in the resulting sequence.
|
||||
- parameter scheduler: Scheduler to run the timer on.
|
||||
- returns: An observable sequence that produces a value after each period.
|
||||
|
|
@ -124,6 +134,8 @@ public func interval<S: SchedulerType>(period: S.TimeInterval, _ scheduler: S)
|
|||
/**
|
||||
Returns an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the specified scheduler to run timers.
|
||||
|
||||
- seealso: [timer operator on reactivex.io](http://reactivex.io/documentation/operators/timer.html)
|
||||
|
||||
- parameter dueTime: Relative time at which to produce the first value.
|
||||
- parameter period: Period to produce subsequent values.
|
||||
- parameter scheduler: Scheduler to run timers on.
|
||||
|
|
@ -152,6 +164,8 @@ public func timer<S: SchedulerType>(dueTime: S.TimeInterval, _ period: S.TimeInt
|
|||
/**
|
||||
Returns an observable sequence that produces a single value at the specified absolute due time, using the specified scheduler to run the timer.
|
||||
|
||||
- seealso: [timer operator on reactivex.io](http://reactivex.io/documentation/operators/timer.html)
|
||||
|
||||
- parameter dueTime: Time interval after which to produce the value.
|
||||
- parameter scheduler: Scheduler to run the timer on.
|
||||
- returns: An observable sequence that produces a value at due time.
|
||||
|
|
@ -182,6 +196,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Takes elements for the specified duration from the start of the observable source sequence, using the specified scheduler to run timers.
|
||||
|
||||
- seealso: [take operator on reactivex.io](http://reactivex.io/documentation/operators/take.html)
|
||||
|
||||
- parameter duration: Duration for taking elements from the start of the sequence.
|
||||
- parameter scheduler: Scheduler to run the timer on.
|
||||
|
|
@ -206,6 +222,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Skips elements for the specified duration from the start of the observable source sequence, using the specified scheduler to run timers.
|
||||
|
||||
- seealso: [skip operator on reactivex.io](http://reactivex.io/documentation/operators/skip.html)
|
||||
|
||||
- parameter duration: Duration for skipping elements from the start of the sequence.
|
||||
- parameter scheduler: Scheduler to run the timer on.
|
||||
|
|
@ -231,6 +249,8 @@ extension ObservableType {
|
|||
/**
|
||||
Skips elements and completes (or errors) when the receiver completes (or errors). Equivalent to filter that always returns false.
|
||||
|
||||
- seealso: [ignoreElements operator on reactivex.io](http://reactivex.io/documentation/operators/ignoreelements.html)
|
||||
|
||||
- returns: An observable sequence that skips all elements of the source sequence.
|
||||
*/
|
||||
@warn_unused_result(message="http://git.io/rxs.uo")
|
||||
|
|
@ -248,6 +268,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Time shifts the observable sequence by delaying the subscription with the specified relative time duration, using the specified scheduler to run timers.
|
||||
|
||||
- seealso: [delay operator on reactivex.io](http://reactivex.io/documentation/operators/delay.html)
|
||||
|
||||
- parameter dueTime: Relative time shift of the subscription.
|
||||
- parameter scheduler: Scheduler to run the subscription delay timer on.
|
||||
|
|
@ -274,6 +296,8 @@ extension ObservableType {
|
|||
Projects each element of an observable sequence into a buffer that's sent out when either it's full or a given amount of time has elapsed, using the specified scheduler to run timers.
|
||||
|
||||
A useful real-world analogy of this overload is the behavior of a ferry leaving the dock when all seats are taken, or at the scheduled time of departure, whichever event occurs first.
|
||||
|
||||
- seealso: [buffer operator on reactivex.io](http://reactivex.io/documentation/operators/buffer.html)
|
||||
|
||||
- parameter timeSpan: Maximum time length of a buffer.
|
||||
- parameter count: Maximum element count of a buffer.
|
||||
|
|
@ -293,6 +317,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Projects each element of an observable sequence into a window that is completed when either it’s full or a given amount of time has elapsed.
|
||||
|
||||
- seealso: [window operator on reactivex.io](http://reactivex.io/documentation/operators/window.html)
|
||||
|
||||
- parameter timeSpan: Maximum time length of a window.
|
||||
- parameter count: Maximum element count of a window.
|
||||
|
|
@ -312,6 +338,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Applies a timeout policy for each element in the observable sequence. If the next element isn't received within the specified timeout duration starting from its predecessor, a TimeoutError is propagated to the observer.
|
||||
|
||||
- seealso: [timeout operator on reactivex.io](http://reactivex.io/documentation/operators/timeout.html)
|
||||
|
||||
- parameter dueTime: Maximum duration between values before a timeout occurs.
|
||||
- parameter scheduler: Scheduler to run the timeout timer on.
|
||||
|
|
@ -331,6 +359,8 @@ extension ObservableType {
|
|||
|
||||
/**
|
||||
Applies a timeout policy for each element in the observable sequence, using the specified scheduler to run timeout timers. If the next element isn't received within the specified timeout duration starting from its predecessor, the other observable sequence is used to produce future messages from that point on.
|
||||
|
||||
- seealso: [timeout operator on reactivex.io](http://reactivex.io/documentation/operators/timeout.html)
|
||||
|
||||
- parameter dueTime: Maximum duration between values before a timeout occurs.
|
||||
- parameter other: Sequence to return in case of a timeout.
|
||||
|
|
|
|||
Loading…
Reference in New Issue