Skip to content

Commit 5e41b04

Browse files
committed
Javadocs: adding @SInCE annotations to new public methods, cleaning up Subject javadocs a bit
1 parent 24dadf1 commit 5e41b04

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

src/main/java/rx/Observable.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2597,8 +2597,7 @@ public final static <T, Resource> Observable<T> using(
25972597
* @return the Observable whose lifetime controls the lifetime of the dependent resource object
25982598
* @see <a href="http://reactivex.io/documentation/operators/using.html">ReactiveX operators documentation: Using</a>
25992599
* @Experimental The behavior of this can change at any time.
2600-
* @since (if this graduates from Experimental/Beta to supported, replace
2601-
* this parenthetical with the release number)
2600+
* @since (if this graduates from Experimental/Beta to supported, replace this parenthetical with the release number)
26022601
*/
26032602
@Experimental
26042603
public final static <T, Resource> Observable<T> using(
@@ -8857,6 +8856,7 @@ public final Observable<List<T>> toSortedList(Func2<? super T, ? super T, Intege
88578856
* @return an Observable that emits a list that contains the items emitted by the source Observable in
88588857
* sorted order
88598858
* @see <a href="http://reactivex.io/documentation/operators/to.html">ReactiveX operators documentation: To</a>
8859+
* @since (if this graduates from Experimental/Beta to supported, replace this parenthetical with the release number)
88608860
*/
88618861
@Experimental
88628862
public final Observable<List<T>> toSortedList(int initialCapacity) {
@@ -8883,6 +8883,7 @@ public final Observable<List<T>> toSortedList(int initialCapacity) {
88838883
* @return an Observable that emits a list that contains the items emitted by the source Observable in
88848884
* sorted order
88858885
* @see <a href="http://reactivex.io/documentation/operators/to.html">ReactiveX operators documentation: To</a>
8886+
* @since (if this graduates from Experimental/Beta to supported, replace this parenthetical with the release number)
88868887
*/
88878888
@Experimental
88888889
public final Observable<List<T>> toSortedList(Func2<? super T, ? super T, Integer> sortFunction, int initialCapacity) {

src/main/java/rx/subjects/Subject.java

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ protected Subject(OnSubscribe<R> onSubscribe) {
3030

3131
/**
3232
* Indicates whether the {@link Subject} has {@link Observer Observers} subscribed to it.
33+
*
3334
* @return true if there is at least one Observer subscribed to this Subject, false otherwise
3435
*/
3536
public abstract boolean hasObservers();
@@ -58,7 +59,9 @@ public final SerializedSubject<T, R> toSerialized() {
5859
/**
5960
* Check if the Subject has terminated with an exception.
6061
* <p>The operation is threadsafe.
61-
* @return true if the subject has received a throwable through {@code onError}.
62+
*
63+
* @return {@code true} if the subject has received a throwable through {@code onError}.
64+
* @since (If this graduates from being an Experimental class method, replace this parenthetical with the release number)
6265
*/
6366
@Experimental
6467
public boolean hasThrowable() {
@@ -67,7 +70,9 @@ public boolean hasThrowable() {
6770
/**
6871
* Check if the Subject has terminated normally.
6972
* <p>The operation is threadsafe.
70-
* @return true if the subject completed normally via {@code onCompleted}
73+
*
74+
* @return {@code true} if the subject completed normally via {@code onCompleted}
75+
* @since (If this graduates from being an Experimental class method, replace this parenthetical with the release number)
7176
*/
7277
@Experimental
7378
public boolean hasCompleted() {
@@ -76,8 +81,10 @@ public boolean hasCompleted() {
7681
/**
7782
* Returns the Throwable that terminated the Subject.
7883
* <p>The operation is threadsafe.
79-
* @return the Throwable that terminated the Subject or {@code null} if the
80-
* subject hasn't terminated yet or it terminated normally.
84+
*
85+
* @return the Throwable that terminated the Subject or {@code null} if the subject hasn't terminated yet or
86+
* if it terminated normally.
87+
* @since (If this graduates from being an Experimental class method, replace this parenthetical with the release number)
8188
*/
8289
@Experimental
8390
public Throwable getThrowable() {
@@ -89,7 +96,9 @@ public Throwable getThrowable() {
8996
* <p>Note that unless {@link #hasCompleted()} or {@link #hasThrowable()} returns true, the value
9097
* retrieved by {@code getValue()} may get outdated.
9198
* <p>The operation is threadsafe.
92-
* @return true if and only if the subject has some value but not an error
99+
*
100+
* @return {@code true} if and only if the subject has some value but not an error
101+
* @since (If this graduates from being an Experimental class method, replace this parenthetical with the release number)
93102
*/
94103
@Experimental
95104
public boolean hasValue() {
@@ -102,8 +111,10 @@ public boolean hasValue() {
102111
* and {@link #hasCompleted()} to determine if such {@code null} is a valid value, there was an
103112
* exception or the Subject terminated without receiving any value.
104113
* <p>The operation is threadsafe.
105-
* @return the current value or {@code null} if the Subject doesn't have a value,
106-
* has terminated with an exception or has an actual {@code null} as a value.
114+
*
115+
* @return the current value or {@code null} if the Subject doesn't have a value, has terminated with an
116+
* exception or has an actual {@code null} as a value.
117+
* @since (If this graduates from being an Experimental class method, replace this parenthetical with the release number)
107118
*/
108119
@Experimental
109120
public T getValue() {
@@ -114,7 +125,9 @@ public T getValue() {
114125
/**
115126
* Returns a snapshot of the currently buffered non-terminal events.
116127
* <p>The operation is threadsafe.
128+
*
117129
* @return a snapshot of the currently buffered non-terminal events.
130+
* @since (If this graduates from being an Experimental class method, replace this parenthetical with the release number)
118131
*/
119132
@SuppressWarnings("unchecked")
120133
@Experimental
@@ -131,10 +144,12 @@ public Object[] getValues() {
131144
* <p>If the subject's values fit in the specified array with room to spare
132145
* (i.e., the array has more elements than the list), the element in
133146
* the array immediately following the end of the subject's values is set to
134-
* <tt>null</tt>.
147+
* {@code null}.
135148
* <p>The operation is threadsafe.
149+
*
136150
* @param a the array to fill in
137151
* @return the array {@code a} if it had enough capacity or a new array containing the available values
152+
* @since (If this graduates from being an Experimental class method, replace this parenthetical with the release number)
138153
*/
139154
@Experimental
140155
public T[] getValues(T[] a) {

0 commit comments

Comments
 (0)