Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x: fix javadoc for ConnectableFlowable and others #5738

Merged
merged 1 commit into from
Nov 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
32 changes: 16 additions & 16 deletions src/main/java/io/reactivex/flowables/ConnectableFlowable.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@
import io.reactivex.plugins.RxJavaPlugins;

/**
* A {@code ConnectableObservable} resembles an ordinary {@link Flowable}, except that it does not begin
* A {@code ConnectableFlowable} resembles an ordinary {@link Flowable}, except that it does not begin
* emitting items when it is subscribed to, but only when its {@link #connect} method is called. In this way you
* can wait for all intended {@link Subscriber}s to {@link Flowable#subscribe} to the {@code Observable}
* before the {@code Observable} begins emitting items.
* can wait for all intended {@link Subscriber}s to {@link Flowable#subscribe} to the {@code Flowable}
* before the {@code Flowable} begins emitting items.
* <p>
* <img width="640" height="510" src="https://github.com/ReactiveX/RxJava/wiki/images/rx-operators/publishConnect.png" alt="">
*
* @see <a href="https://github.com/ReactiveX/RxJava/wiki/Connectable-Observable-Operators">RxJava Wiki:
* Connectable Observable Operators</a>
* @param <T>
* the type of items emitted by the {@code ConnectableObservable}
* the type of items emitted by the {@code ConnectableFlowable}
*/
public abstract class ConnectableFlowable<T> extends Flowable<T> {

/**
* Instructs the {@code ConnectableObservable} to begin emitting the items from its underlying
* Instructs the {@code ConnectableFlowable} to begin emitting the items from its underlying
* {@link Flowable} to its {@link Subscriber}s.
*
* @param connection
Expand All @@ -51,7 +51,7 @@ public abstract class ConnectableFlowable<T> extends Flowable<T> {
public abstract void connect(@NonNull Consumer<? super Disposable> connection);

/**
* Instructs the {@code ConnectableObservable} to begin emitting the items from its underlying
* Instructs the {@code ConnectableFlowable} to begin emitting the items from its underlying
* {@link Flowable} to its {@link Subscriber}s.
* <p>
* To disconnect from a synchronous source, use the {@link #connect(io.reactivex.functions.Consumer)} method.
Expand All @@ -66,8 +66,8 @@ public final Disposable connect() {
}

/**
* Returns an {@code Observable} that stays connected to this {@code ConnectableObservable} as long as there
* is at least one subscription to this {@code ConnectableObservable}.
* Returns a {@code Flowable} that stays connected to this {@code ConnectableFlowable} as long as there
* is at least one subscription to this {@code ConnectableFlowable}.
*
* @return a {@link Flowable}
* @see <a href="http://reactivex.io/documentation/operators/refcount.html">ReactiveX documentation: RefCount</a>
Expand All @@ -78,24 +78,24 @@ public Flowable<T> refCount() {
}

/**
* Returns an Observable that automatically connects to this ConnectableObservable
* Returns a Flowable that automatically connects to this ConnectableFlowable
* when the first Subscriber subscribes.
*
* @return an Observable that automatically connects to this ConnectableObservable
* @return a Flowable that automatically connects to this ConnectableFlowable
* when the first Subscriber subscribes
*/
@NonNull
public Flowable<T> autoConnect() {
return autoConnect(1);
}
/**
* Returns an Observable that automatically connects to this ConnectableObservable
* Returns a Flowable that automatically connects to this ConnectableFlowable
* when the specified number of Subscribers subscribe to it.
*
* @param numberOfSubscribers the number of subscribers to await before calling connect
* on the ConnectableObservable. A non-positive value indicates
* on the ConnectableFlowable. A non-positive value indicates
* an immediate connection.
* @return an Observable that automatically connects to this ConnectableObservable
* @return a Flowable that automatically connects to this ConnectableFlowable
* when the specified number of Subscribers subscribe to it
*/
@NonNull
Expand All @@ -104,16 +104,16 @@ public Flowable<T> autoConnect(int numberOfSubscribers) {
}

/**
* Returns an Observable that automatically connects to this ConnectableObservable
* Returns a Flowable that automatically connects to this ConnectableFlowable
* when the specified number of Subscribers subscribe to it and calls the
* specified callback with the Subscription associated with the established connection.
*
* @param numberOfSubscribers the number of subscribers to await before calling connect
* on the ConnectableObservable. A non-positive value indicates
* on the ConnectableFlowable. A non-positive value indicates
* an immediate connection.
* @param connection the callback Consumer that will receive the Subscription representing the
* established connection
* @return an Observable that automatically connects to this ConnectableObservable
* @return a Flowable that automatically connects to this ConnectableFlowable
* when the specified number of Subscribers subscribe to it and calls the
* specified callback with the Subscription associated with the established connection
*/
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/reactivex/flowables/GroupedFlowable.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* <p>
* <em>Note:</em> A {@link GroupedFlowable} will cache the items it is to emit until such time as it
* is subscribed to. For this reason, in order to avoid memory leaks, you should not simply ignore those
* {@code GroupedObservable}s that do not concern you. Instead, you can signal to them that they
* {@code GroupedFlowable}s that do not concern you. Instead, you can signal to them that they
* may discard their buffers by applying an operator like {@link Flowable#take take}{@code (0)} to them.
*
* @param <K>
Expand All @@ -43,9 +43,9 @@ protected GroupedFlowable(@Nullable K key) {
}

/**
* Returns the key that identifies the group of items emitted by this {@code GroupedObservable}.
* Returns the key that identifies the group of items emitted by this {@code GroupedFlowable}.
*
* @return the key that the items emitted by this {@code GroupedObservable} were grouped by
* @return the key that the items emitted by this {@code GroupedFlowable} were grouped by
*/
@Nullable
public K getKey() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import io.reactivex.functions.Consumer;

/**
* Wraps a ConnectableObservable and calls its connect() method once
* the specified number of Subscribers have subscribed.
* Wraps a {@link ConnectableFlowable} and calls its {@code connect()} method once
* the specified number of {@link Subscriber}s have subscribed.
*
* @param <T> the value type of the chain
*/
Expand Down