ReactiveX官网operators Introduction翻译

ReactiveX-operators链接

Introduction

Each language-specific implementation of ReactiveX implements a set of operators. Although there is much overlap between implementations, there are also some operators that are only implemented in certain implementations. Also, each implementation tends to name its operators to resemble those of similar methods that are already familiar from other contexts in that language.

介绍

每种编程语言实现ReactiveX时都实现了一组运算符。不同实现之间操作符有很多重叠,但也有一些操作符仅存在某些特定语言中。同时,每种实现都倾向于用那种编程语言中他们熟悉的上下文中相似的方法给这些操作符命名。(开始自己的翻译:将other contexts翻译为其它语言,而in是限定other contexts,故应理解为当前语言的上下文场景。错误翻译:每种语言下的实现都倾向于将其操作符命名为其它已实现语言上下文中的类似方法。)

Chaining Operators

Most operators operate on an Observable and return an Observable. This allows you to apply these operators one after the other, in a chain. Each operator in the chain modifies the Observable that results from the operation of the previous operator.

链式操作符

大多数操作符在Observable上进行操作并返回Observable。使您可以在调用链中一个接一个地应用这些操作符。链中的每个运算符都会修改前一个运算符的操作所产生的Observable。

There are other patterns, like the Builder Pattern, in which a variety of methods of a particular class operate on an item of that same class by modifying that object through the operation of the method. These patterns also allow you to chain the methods in a similar way. But while in the Builder Pattern, the order in which the methods appear in the chain does not usually matter, with the Observable operators order matters.
有些其它模式,如Builder模式...提供了相似的方法链式调用方式,但Builder模式在调用链中方法出现的顺序通常并不重要,而Observable操作符的调用顺序则很重要。

A chain of Observable operators do not operate independently on the original Observable that originates the chain, but they operate in turn, each one operating on the Observable generated by the operator immediately previous in the chain.
一系列Observable操作符并不在该链的原始Observable上独立运行,而是依次运行。每个操作符运行在调用链邻接的前一个操作符生成的Observable(每个操作符由Observable对象调用,而Observable对象由调用链邻接的前一个操作符生成,如Observable.create().map().flapmap().subscribe(),Observable.create()生成原始Observable,map()生成新的Observable,flapmap()也生成新的Observable,形成链式调用)。

The Operators of ReactiveX

This page first lists what could be considered the “core” operators in ReactiveX, and links to pages that have more in-depth information on how these operators work and how particular language-specific ReactiveX versions have implemented these operators.

ReactiveX操作符

首页将展示核心操作符...

Next is a “decision tree” that may help you choose the operator that is most appropriate to your use case.

Finally, there is an alphabetical list of most of the operators available in the many language-specific implementations of ReactiveX. These link to the page that documents the core operator that most closely resembles the language-specific operator (so, for instance, the Rx.NET “SelectMany” operator links to the documentation of the FlatMap ReactiveX operator, of which “SelectMany” is the Rx.NET implementation).

If you want to implement your own operator, see Implementing Your Own Operators.

By the way: 非常感谢能提出批评和修改意见
contact: [email protected]

你可能感兴趣的:(ReactiveX官网operators Introduction翻译)