Skip to content

Commit 1a49a5e

Browse files
committed
Javadoc
1 parent 08bf347 commit 1a49a5e

File tree

7 files changed

+197
-198
lines changed

7 files changed

+197
-198
lines changed

src/main/java/org/apache/commons/lang3/mutable/Mutable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ default T get() {
4949
/**
5050
* Gets the value of this mutable.
5151
*
52-
* @return the stored value
52+
* @return the stored value.
5353
* @deprecated Use {@link #get()}.
5454
*/
5555
@Deprecated
@@ -58,7 +58,7 @@ default T get() {
5858
/**
5959
* Sets the value of this mutable.
6060
*
61-
* @param value the value to store
61+
* @param value the value to store.
6262
* @throws NullPointerException if the object is null and null is invalid.
6363
* @throws ClassCastException if the type is invalid.
6464
*/

src/main/java/org/apache/commons/lang3/mutable/MutableByte.java

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
* <p>
2727
* Note that as MutableByte does not extend Byte, it is not treated by String.format as a Byte parameter.
2828
* </p>
29-
* <p>
3029
*
3130
* @see Byte
3231
* @see AtomicInteger
@@ -62,8 +61,8 @@ public MutableByte(final byte value) {
6261
/**
6362
* Constructs a new MutableByte with the specified value.
6463
*
65-
* @param value the initial value to store, not null
66-
* @throws NullPointerException if the object is null
64+
* @param value the initial value to store, not null.
65+
* @throws NullPointerException if the object is null.
6766
*/
6867
public MutableByte(final Number value) {
6968
this.value = value.byteValue();
@@ -72,7 +71,7 @@ public MutableByte(final Number value) {
7271
/**
7372
* Constructs a new MutableByte parsing the given string.
7473
*
75-
* @param value the string to parse, not null
74+
* @param value the string to parse, not null.
7675
* @throws NumberFormatException if the string cannot be parsed into a byte, see {@link Byte#parseByte(String)}.
7776
* @since 2.5
7877
*/
@@ -83,7 +82,7 @@ public MutableByte(final String value) {
8382
/**
8483
* Adds a value to the value of this instance.
8584
*
86-
* @param operand the value to add, not null
85+
* @param operand the value to add, not null.
8786
* @since 2.2
8887
*/
8988
public void add(final byte operand) {
@@ -93,8 +92,8 @@ public void add(final byte operand) {
9392
/**
9493
* Adds a value to the value of this instance.
9594
*
96-
* @param operand the value to add, not null
97-
* @throws NullPointerException if the object is null
95+
* @param operand the value to add, not null.
96+
* @throws NullPointerException if the object is null.
9897
* @since 2.2
9998
*/
10099
public void add(final Number operand) {
@@ -105,8 +104,8 @@ public void add(final Number operand) {
105104
* Increments this instance's value by {@code operand}; this method returns the value associated with the instance
106105
* immediately after the addition operation. This method is not thread safe.
107106
*
108-
* @param operand the quantity to add, not null
109-
* @return the value associated with this instance after adding the operand
107+
* @param operand the quantity to add, not null.
108+
* @return the value associated with this instance after adding the operand.
110109
* @since 3.5
111110
*/
112111
public byte addAndGet(final byte operand) {
@@ -118,9 +117,9 @@ public byte addAndGet(final byte operand) {
118117
* Increments this instance's value by {@code operand}; this method returns the value associated with the instance
119118
* immediately after the addition operation. This method is not thread safe.
120119
*
121-
* @param operand the quantity to add, not null
122-
* @throws NullPointerException if {@code operand} is null
123-
* @return the value associated with this instance after adding the operand
120+
* @param operand the quantity to add, not null.
121+
* @throws NullPointerException if {@code operand} is null.
122+
* @return the value associated with this instance after adding the operand.
124123
* @since 3.5
125124
*/
126125
public byte addAndGet(final Number operand) {
@@ -142,8 +141,8 @@ public byte byteValue() {
142141
/**
143142
* Compares this mutable to another in ascending order.
144143
*
145-
* @param other the other mutable to compare to, not null
146-
* @return negative if this is less, zero if equal, positive if greater
144+
* @param other the other mutable to compare to, not null.
145+
* @return negative if this is less, zero if equal, positive if greater.
147146
*/
148147
@Override
149148
public int compareTo(final MutableByte other) {
@@ -163,7 +162,7 @@ public void decrement() {
163162
* Decrements this instance's value by 1; this method returns the value associated with the instance
164163
* immediately after the decrement operation. This method is not thread safe.
165164
*
166-
* @return the value associated with the instance after it is decremented
165+
* @return the value associated with the instance after it is decremented.
167166
* @since 3.5
168167
*/
169168
public byte decrementAndGet() {
@@ -186,7 +185,7 @@ public double doubleValue() {
186185
* not {@code null} and is a {@link MutableByte} object that contains the same {@code byte} value
187186
* as this object.
188187
*
189-
* @param obj the object to compare with, null returns false
188+
* @param obj the object to compare with, null returns false.
190189
* @return {@code true} if the objects are the same; {@code false} otherwise.
191190
*/
192191
@Override
@@ -211,8 +210,8 @@ public float floatValue() {
211210
* Increments this instance's value by {@code operand}; this method returns the value associated with the instance
212211
* immediately prior to the addition operation. This method is not thread safe.
213212
*
214-
* @param operand the quantity to add, not null
215-
* @return the value associated with this instance immediately before the operand was added
213+
* @param operand the quantity to add, not null.
214+
* @return the value associated with this instance immediately before the operand was added.
216215
* @since 3.5
217216
*/
218217
public byte getAndAdd(final byte operand) {
@@ -225,9 +224,9 @@ public byte getAndAdd(final byte operand) {
225224
* Increments this instance's value by {@code operand}; this method returns the value associated with the instance
226225
* immediately prior to the addition operation. This method is not thread safe.
227226
*
228-
* @param operand the quantity to add, not null
229-
* @throws NullPointerException if {@code operand} is null
230-
* @return the value associated with this instance immediately before the operand was added
227+
* @param operand the quantity to add, not null.
228+
* @throws NullPointerException if {@code operand} is null.
229+
* @return the value associated with this instance immediately before the operand was added.
231230
* @since 3.5
232231
*/
233232
public byte getAndAdd(final Number operand) {
@@ -240,7 +239,7 @@ public byte getAndAdd(final Number operand) {
240239
* Decrements this instance's value by 1; this method returns the value associated with the instance
241240
* immediately prior to the decrement operation. This method is not thread safe.
242241
*
243-
* @return the value associated with the instance before it was decremented
242+
* @return the value associated with the instance before it was decremented.
244243
* @since 3.5
245244
*/
246245
public byte getAndDecrement() {
@@ -253,7 +252,7 @@ public byte getAndDecrement() {
253252
* Increments this instance's value by 1; this method returns the value associated with the instance
254253
* immediately prior to the increment operation. This method is not thread safe.
255254
*
256-
* @return the value associated with the instance before it was incremented
255+
* @return the value associated with the instance before it was incremented.
257256
* @since 3.5
258257
*/
259258
public byte getAndIncrement() {
@@ -277,7 +276,7 @@ public Byte getValue() {
277276
/**
278277
* Returns a suitable hash code for this mutable.
279278
*
280-
* @return a suitable hash code
279+
* @return a suitable hash code.
281280
*/
282281
@Override
283282
public int hashCode() {
@@ -297,7 +296,7 @@ public void increment() {
297296
* Increments this instance's value by 1; this method returns the value associated with the instance
298297
* immediately after the increment operation. This method is not thread safe.
299298
*
300-
* @return the value associated with the instance after it is incremented
299+
* @return the value associated with the instance after it is incremented.
301300
* @since 3.5
302301
*/
303302
public byte incrementAndGet() {
@@ -328,7 +327,7 @@ public long longValue() {
328327
/**
329328
* Sets the value.
330329
*
331-
* @param value the value to set
330+
* @param value the value to set.
332331
*/
333332
public void setValue(final byte value) {
334333
this.value = value;
@@ -337,8 +336,8 @@ public void setValue(final byte value) {
337336
/**
338337
* Sets the value from any Number instance.
339338
*
340-
* @param value the value to set, not null
341-
* @throws NullPointerException if the object is null
339+
* @param value the value to set, not null.
340+
* @throws NullPointerException if the object is null.
342341
*/
343342
@Override
344343
public void setValue(final Number value) {
@@ -348,7 +347,7 @@ public void setValue(final Number value) {
348347
/**
349348
* Subtracts a value from the value of this instance.
350349
*
351-
* @param operand the value to subtract, not null
350+
* @param operand the value to subtract, not null.
352351
* @since 2.2
353352
*/
354353
public void subtract(final byte operand) {
@@ -358,8 +357,8 @@ public void subtract(final byte operand) {
358357
/**
359358
* Subtracts a value from the value of this instance.
360359
*
361-
* @param operand the value to subtract, not null
362-
* @throws NullPointerException if the object is null
360+
* @param operand the value to subtract, not null.
361+
* @throws NullPointerException if the object is null.
363362
* @since 2.2
364363
*/
365364
public void subtract(final Number operand) {
@@ -369,7 +368,7 @@ public void subtract(final Number operand) {
369368
/**
370369
* Gets this mutable as an instance of Byte.
371370
*
372-
* @return a Byte instance containing the value from this mutable
371+
* @return a Byte instance containing the value from this mutable.
373372
*/
374373
public Byte toByte() {
375374
return Byte.valueOf(byteValue());
@@ -378,7 +377,7 @@ public Byte toByte() {
378377
/**
379378
* Returns the String value of this mutable.
380379
*
381-
* @return the mutable value as a string
380+
* @return the mutable value as a string.
382381
*/
383382
@Override
384383
public String toString() {

0 commit comments

Comments
 (0)