[LANG-1626] Correction in Javadoc of some methods. (#673)

1) Found Javadoc examples in ArrayUtils.addFirst() incorrectly refer to add() at 9 places.
2) Basic code format in 3 files from time package.
This commit is contained in:
Kanak Sony 2020-12-11 10:33:30 +05:30 committed by GitHub
parent 55e0776408
commit efbfd2de97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 48 deletions

View File

@ -1099,9 +1099,9 @@ public static <T> T[] addAll(final T[] array1, @SuppressWarnings("unchecked") fi
* </p>
*
* <pre>
* ArrayUtils.add(null, true) = [true]
* ArrayUtils.add([true], false) = [false, true]
* ArrayUtils.add([true, false], true) = [true, true, false]
* ArrayUtils.addFirst(null, true) = [true]
* ArrayUtils.addFirst([true], false) = [false, true]
* ArrayUtils.addFirst([true, false], true) = [true, true, false]
* </pre>
*
* @param array the array to "add" the element to, may be {@code null}.
@ -1128,9 +1128,9 @@ public static boolean[] addFirst(final boolean[] array, final boolean element) {
* </p>
*
* <pre>
* ArrayUtils.add(null, 1) = [1]
* ArrayUtils.add([1], 0) = [0, 1]
* ArrayUtils.add([1, 0], 1) = [1, 1, 0]
* ArrayUtils.addFirst(null, 1) = [1]
* ArrayUtils.addFirst([1], 0) = [0, 1]
* ArrayUtils.addFirst([1, 0], 1) = [1, 1, 0]
* </pre>
*
* @param array the array to "add" the element to, may be {@code null}.
@ -1157,9 +1157,9 @@ public static byte[] addFirst(final byte[] array, final byte element) {
* </p>
*
* <pre>
* ArrayUtils.add(null, '1') = ['1']
* ArrayUtils.add(['1'], '0') = ['0', '1']
* ArrayUtils.add(['1', '0'], '1') = ['1', '1', '0']
* ArrayUtils.addFirst(null, '1') = ['1']
* ArrayUtils.addFirst(['1'], '0') = ['0', '1']
* ArrayUtils.addFirst(['1', '0'], '1') = ['1', '1', '0']
* </pre>
*
* @param array the array to "add" the element to, may be {@code null}.
@ -1186,9 +1186,9 @@ public static char[] addFirst(final char[] array, final char element) {
* </p>
*
* <pre>
* ArrayUtils.add(null, 1) = [1]
* ArrayUtils.add([1], 0) = [0, 1]
* ArrayUtils.add([1, 0], 1) = [1, 1, 0]
* ArrayUtils.addFirst(null, 1) = [1]
* ArrayUtils.addFirst([1], 0) = [0, 1]
* ArrayUtils.addFirst([1, 0], 1) = [1, 1, 0]
* </pre>
*
* @param array the array to "add" the element to, may be {@code null}.
@ -1215,9 +1215,9 @@ public static double[] addFirst(final double[] array, final double element) {
* </p>
*
* <pre>
* ArrayUtils.add(null, 1) = [1]
* ArrayUtils.add([1], 0) = [0, 1]
* ArrayUtils.add([1, 0], 1) = [1, 1, 0]
* ArrayUtils.addFirst(null, 1) = [1]
* ArrayUtils.addFirst([1], 0) = [0, 1]
* ArrayUtils.addFirst([1, 0], 1) = [1, 1, 0]
* </pre>
*
* @param array the array to "add" the element to, may be {@code null}.
@ -1244,9 +1244,9 @@ public static float[] addFirst(final float[] array, final float element) {
* </p>
*
* <pre>
* ArrayUtils.add(null, 1) = [1]
* ArrayUtils.add([1], 0) = [0, 1]
* ArrayUtils.add([1, 0], 1) = [1, 1, 0]
* ArrayUtils.addFirst(null, 1) = [1]
* ArrayUtils.addFirst([1], 0) = [0, 1]
* ArrayUtils.addFirst([1, 0], 1) = [1, 1, 0]
* </pre>
*
* @param array the array to "add" the element to, may be {@code null}.
@ -1273,9 +1273,9 @@ public static int[] addFirst(final int[] array, final int element) {
* </p>
*
* <pre>
* ArrayUtils.add(null, 1) = [1]
* ArrayUtils.add([1], 0) = [0, 1]
* ArrayUtils.add([1, 0], 1) = [1, 1, 0]
* ArrayUtils.addFirst(null, 1) = [1]
* ArrayUtils.addFirst([1], 0) = [0, 1]
* ArrayUtils.addFirst([1, 0], 1) = [1, 1, 0]
* </pre>
*
* @param array the array to "add" the element to, may be {@code null}.
@ -1302,9 +1302,9 @@ public static long[] addFirst(final long[] array, final long element) {
* </p>
*
* <pre>
* ArrayUtils.add(null, 1) = [1]
* ArrayUtils.add([1], 0) = [0, 1]
* ArrayUtils.add([1, 0], 1) = [1, 1, 0]
* ArrayUtils.addFirst(null, 1) = [1]
* ArrayUtils.addFirst([1], 0) = [0, 1]
* ArrayUtils.addFirst([1, 0], 1) = [1, 1, 0]
* </pre>
*
* @param array the array to "add" the element to, may be {@code null}.
@ -1331,11 +1331,11 @@ public static short[] addFirst(final short[] array, final short element) {
* </p>
*
* <pre>
* ArrayUtils.add(null, null) = IllegalArgumentException
* ArrayUtils.add(null, "a") = ["a"]
* ArrayUtils.add(["a"], null) = [null, "a"]
* ArrayUtils.add(["a"], "b") = ["b", "a"]
* ArrayUtils.add(["a", "b"], "c") = ["c", "a", "b"]
* ArrayUtils.addFirst(null, null) = IllegalArgumentException
* ArrayUtils.addFirst(null, "a") = ["a"]
* ArrayUtils.addFirst(["a"], null) = [null, "a"]
* ArrayUtils.addFirst(["a"], "b") = ["b", "a"]
* ArrayUtils.addFirst(["a", "b"], "c") = ["c", "a", "b"]
* </pre>
*
* @param <T> the component type of the array