@@ -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