Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Flatten the create-table
  • Loading branch information
akarnokd committed Jun 1, 2016
commit a8afb07c7094c829df4074642f48f90e968bd0e7
32 changes: 23 additions & 9 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,29 @@ Therefore, new standard factory methods will try to address the common entry poi
- `create(Consumer<? super FlowEmitter<T>>)` to relay multiple values or error from multi-valued reactive-sources (i.e., button-clicks) while also give flow control options right there (buffer, drop, error, etc.).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I'm not seeing how the SingleEmitter can be used to model an Observable? Is this an Observable of just 1 value? I think that the table is not accurately portraying their usage.

- `create(Consumer<? super CompletionEmitter)>` signal a completion or error from valueless reactive sources

The following table lists where these create methods will be available in respect of the base types:

| Method | Flowable | Observable | Single | Completable |
|--------|----------|------------|--------|-------------|
| `create(SyncGenerator<T, S>)` | Yes | Yes | No | No |
| `create(AsyncOnSubscribe<T, S>)` | Yes | No | No | No |
| `create(Consumer<? super SingleEmitter<T>>)` | Yes | Yes | Yes | No |
| `create(Consumer<? super FlowEmitter<T>>)` | Yes | Yes | No | No |
| `create(Consumer<? super CompletionEmitter>)` | Yes | Yes | No | Yes |
The `Flowable` will contain the following `create` methods:

- `create(SyncGenerator<T, S>)`
- `create(AsyncOnSubscribe<T, S>)`
- `create(Consumer<? super SingleEmitter<T>>)`
- `create(Consumer<? super FlowEmitter<T>>)`
- `create(Consumer<? super CompletionEmitter>)`

The `Observable` will contain the following `create` methods:

- `create(SyncGenerator<T, S>)`
- `create(Consumer<? super SingleEmitter<T>>)`
- `create(Consumer<? super FlowEmitter<T>>)`
- `create(Consumer<? super CompletionEmitter>)`

The `Single` will contain the following `create` method:

- `create(Consumer<? super SingleEmitter<T>>)`

The `Completable` will contain the following `create` method:

- `create(Consumer<? super CompletionEmitter>)`


The first two `create` methods take an implementation of an interface which provides state and the generator methods:

Expand Down