diff options
Diffstat (limited to 'src/org/apache/commons')
28 files changed, 412 insertions, 412 deletions
diff --git a/src/org/apache/commons/lang3/CharSequenceUtils.java b/src/org/apache/commons/lang3/CharSequenceUtils.java index a785ab7..fc0070f 100644 --- a/src/org/apache/commons/lang3/CharSequenceUtils.java +++ b/src/org/apache/commons/lang3/CharSequenceUtils.java @@ -49,7 +49,7 @@ public class CharSequenceUtils { * @param cs the specified subsequence, null returns null * @param start the start index, inclusive, valid * @return a new subsequence, may be null - * @throws IndexOutOfBoundsException if {@code start} is negative or if + * @throws IndexOutOfBoundsException if {@code start} is negative or if * {@code start} is greater than {@code length()} */ public static CharSequence subSequence(CharSequence cs, int start) { diff --git a/src/org/apache/commons/lang3/CharUtils.java b/src/org/apache/commons/lang3/CharUtils.java index e2ef207..6884625 100644 --- a/src/org/apache/commons/lang3/CharUtils.java +++ b/src/org/apache/commons/lang3/CharUtils.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,18 +22,18 @@ package org.apache.commons.lang3; * <p>This class tries to handle {@code null} input gracefully. * An exception will not be thrown for a {@code null} input. * Each method documents its behaviour in more detail.</p> - * + * * <p>#ThreadSafe#</p> * @since 2.1 * @version $Id$ */ public class CharUtils { - + private static final String[] CHAR_STRING_ARRAY = new String[128]; - + /** * {@code \u000a} linefeed LF ('\n'). - * + * * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#101089">JLF: Escape Sequences * for Character and String Literals</a> * @since 2.2 @@ -42,13 +42,13 @@ public class CharUtils { /** * {@code \u000d} carriage return CR ('\r'). - * + * * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#101089">JLF: Escape Sequences * for Character and String Literals</a> * @since 2.2 */ public static final char CR = '\r'; - + static { for (char c = 0; c < CHAR_STRING_ARRAY.length; c++) { @@ -70,10 +70,10 @@ public class CharUtils { /** * <p>Converts the String to a Character using the first character, returning * null for empty Strings.</p> - * + * * <p>For ASCII 7 bit characters, this uses a cache that will return the * same Character object each time.</p> - * + * * <pre> * CharUtils.toCharacterObject(null) = null * CharUtils.toCharacterObject("") = null @@ -90,11 +90,11 @@ public class CharUtils { } return Character.valueOf(str.charAt(0)); } - + //----------------------------------------------------------------------- /** * <p>Converts the Character to a char throwing an exception for {@code null}.</p> - * + * * <pre> * CharUtils.toChar(' ') = ' ' * CharUtils.toChar('A') = 'A' @@ -111,10 +111,10 @@ public class CharUtils { } return ch.charValue(); } - + /** * <p>Converts the Character to a char handling {@code null}.</p> - * + * * <pre> * CharUtils.toChar(null, 'X') = 'X' * CharUtils.toChar(' ', 'X') = ' ' @@ -131,12 +131,12 @@ public class CharUtils { } return ch.charValue(); } - + //----------------------------------------------------------------------- /** * <p>Converts the String to a char using the first character, throwing * an exception on empty Strings.</p> - * + * * <pre> * CharUtils.toChar("A") = 'A' * CharUtils.toChar("BA") = 'B' @@ -154,11 +154,11 @@ public class CharUtils { } return str.charAt(0); } - + /** * <p>Converts the String to a char using the first character, defaulting * the value on empty Strings.</p> - * + * * <pre> * CharUtils.toChar(null, 'X') = 'X' * CharUtils.toChar("", 'X') = 'X' @@ -176,12 +176,12 @@ public class CharUtils { } return str.charAt(0); } - + //----------------------------------------------------------------------- /** * <p>Converts the character to the Integer it represents, throwing an * exception if the character is not numeric.</p> - * + * * <p>This method coverts the char '1' to the int 1 and so on.</p> * * <pre> @@ -199,11 +199,11 @@ public class CharUtils { } return ch - 48; } - + /** * <p>Converts the character to the Integer it represents, throwing an * exception if the character is not numeric.</p> - * + * * <p>This method coverts the char '1' to the int 1 and so on.</p> * * <pre> @@ -221,11 +221,11 @@ public class CharUtils { } return ch - 48; } - + /** * <p>Converts the character to the Integer it represents, throwing an * exception if the character is not numeric.</p> - * + * * <p>This method coverts the char '1' to the int 1 and so on.</p> * * <pre> @@ -244,11 +244,11 @@ public class CharUtils { } return toIntValue(ch.charValue()); } - + /** * <p>Converts the character to the Integer it represents, throwing an * exception if the character is not numeric.</p> - * + * * <p>This method coverts the char '1' to the int 1 and so on.</p> * * <pre> @@ -267,11 +267,11 @@ public class CharUtils { } return toIntValue(ch.charValue(), defaultValue); } - + //----------------------------------------------------------------------- /** * <p>Converts the character to a String that contains the one character.</p> - * + * * <p>For ASCII 7 bit characters, this uses a cache that will return the * same String object each time.</p> * @@ -289,13 +289,13 @@ public class CharUtils { } return new String(new char[] {ch}); } - + /** * <p>Converts the character to a String that contains the one character.</p> - * + * * <p>For ASCII 7 bit characters, this uses a cache that will return the * same String object each time.</p> - * + * * <p>If {@code null} is passed in, {@code null} will be returned.</p> * * <pre> @@ -313,18 +313,18 @@ public class CharUtils { } return toString(ch.charValue()); } - + //-------------------------------------------------------------------------- /** * <p>Converts the string to the Unicode format '\u0020'.</p> - * + * * <p>This format is the Java source code format.</p> * * <pre> * CharUtils.unicodeEscaped(' ') = "\u0020" * CharUtils.unicodeEscaped('A') = "\u0041" * </pre> - * + * * @param ch the character to convert * @return the escaped Unicode string */ @@ -338,12 +338,12 @@ public class CharUtils { } return "\\u" + Integer.toHexString(ch); } - + /** * <p>Converts the string to the Unicode format '\u0020'.</p> - * + * * <p>This format is the Java source code format.</p> - * + * * <p>If {@code null} is passed in, {@code null} will be returned.</p> * * <pre> @@ -351,7 +351,7 @@ public class CharUtils { * CharUtils.unicodeEscaped(' ') = "\u0020" * CharUtils.unicodeEscaped('A') = "\u0041" * </pre> - * + * * @param ch the character to convert, may be null * @return the escaped Unicode string, null if null input */ @@ -361,7 +361,7 @@ public class CharUtils { } return unicodeEscaped(ch.charValue()); } - + //-------------------------------------------------------------------------- /** * <p>Checks whether the character is ASCII 7 bit.</p> @@ -374,14 +374,14 @@ public class CharUtils { * CharUtils.isAscii('\n') = true * CharUtils.isAscii('©') = false * </pre> - * + * * @param ch the character to check * @return true if less than 128 */ public static boolean isAscii(char ch) { return ch < 128; } - + /** * <p>Checks whether the character is ASCII 7 bit printable.</p> * @@ -393,14 +393,14 @@ public class CharUtils { * CharUtils.isAsciiPrintable('\n') = false * CharUtils.isAsciiPrintable('©') = false * </pre> - * + * * @param ch the character to check * @return true if between 32 and 126 inclusive */ public static boolean isAsciiPrintable(char ch) { return ch >= 32 && ch < 127; } - + /** * <p>Checks whether the character is ASCII 7 bit control.</p> * @@ -412,14 +412,14 @@ public class CharUtils { * CharUtils.isAsciiControl('\n') = true * CharUtils.isAsciiControl('©') = false * </pre> - * + * * @param ch the character to check * @return true if less than 32 or equals 127 */ public static boolean isAsciiControl(char ch) { return ch < 32 || ch == 127; } - + /** * <p>Checks whether the character is ASCII 7 bit alphabetic.</p> * @@ -431,14 +431,14 @@ public class CharUtils { * CharUtils.isAsciiAlpha('\n') = false * CharUtils.isAsciiAlpha('©') = false * </pre> - * + * * @param ch the character to check * @return true if between 65 and 90 or 97 and 122 inclusive */ public static boolean isAsciiAlpha(char ch) { return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); } - + /** * <p>Checks whether the character is ASCII 7 bit alphabetic upper case.</p> * @@ -450,14 +450,14 @@ public class CharUtils { * CharUtils.isAsciiAlphaUpper('\n') = false * CharUtils.isAsciiAlphaUpper('©') = false * </pre> - * + * * @param ch the character to check * @return true if between 65 and 90 inclusive */ public static boolean isAsciiAlphaUpper(char ch) { return ch >= 'A' && ch <= 'Z'; } - + /** * <p>Checks whether the character is ASCII 7 bit alphabetic lower case.</p> * @@ -469,14 +469,14 @@ public class CharUtils { * CharUtils.isAsciiAlphaLower('\n') = false * CharUtils.isAsciiAlphaLower('©') = false * </pre> - * + * * @param ch the character to check * @return true if between 97 and 122 inclusive */ public static boolean isAsciiAlphaLower(char ch) { return ch >= 'a' && ch <= 'z'; } - + /** * <p>Checks whether the character is ASCII 7 bit numeric.</p> * @@ -488,14 +488,14 @@ public class CharUtils { * CharUtils.isAsciiNumeric('\n') = false * CharUtils.isAsciiNumeric('©') = false * </pre> - * + * * @param ch the character to check * @return true if between 48 and 57 inclusive */ public static boolean isAsciiNumeric(char ch) { return ch >= '0' && ch <= '9'; } - + /** * <p>Checks whether the character is ASCII 7 bit numeric.</p> * @@ -507,12 +507,12 @@ public class CharUtils { * CharUtils.isAsciiAlphanumeric('\n') = false * CharUtils.isAsciiAlphanumeric('©') = false * </pre> - * + * * @param ch the character to check * @return true if between 48 and 57 or 65 and 90 or 97 and 122 inclusive */ public static boolean isAsciiAlphanumeric(char ch) { return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9'); } - + }
\ No newline at end of file diff --git a/src/org/apache/commons/lang3/ClassUtils.java b/src/org/apache/commons/lang3/ClassUtils.java index 48910f8..5a5abcd 100644 --- a/src/org/apache/commons/lang3/ClassUtils.java +++ b/src/org/apache/commons/lang3/ClassUtils.java @@ -156,9 +156,9 @@ public class ClassUtils { /** * <p>Gets the class name minus the package name from a {@code Class}.</p> - * - * <p>Consider using the Java 5 API {@link Class#getSimpleName()} instead. - * The one known difference is that this code will return {@code "Map.Entry"} while + * + * <p>Consider using the Java 5 API {@link Class#getSimpleName()} instead. + * The one known difference is that this code will return {@code "Map.Entry"} while * the {@code java.lang.Class} variant will simply return {@code "Entry"}. </p> * * @param cls the class to get the short name for. @@ -176,8 +176,8 @@ public class ClassUtils { * * <p>The string passed in is assumed to be a class name - it is not checked.</p> - * <p>Note that this method differs from Class.getSimpleName() in that this will - * return {@code "Map.Entry"} whilst the {@code java.lang.Class} variant will simply + * <p>Note that this method differs from Class.getSimpleName() in that this will + * return {@code "Map.Entry"} whilst the {@code java.lang.Class} variant will simply * return {@code "Entry"}. </p> * * @param className the className to get the short name for diff --git a/src/org/apache/commons/lang3/JavaVersion.java b/src/org/apache/commons/lang3/JavaVersion.java index a33735c..1008978 100644 --- a/src/org/apache/commons/lang3/JavaVersion.java +++ b/src/org/apache/commons/lang3/JavaVersion.java @@ -25,12 +25,12 @@ package org.apache.commons.lang3; * @version $Id: $ */ public enum JavaVersion { - + /** * The Java version reported by Android. This is not an official Java version number. */ JAVA_0_9(1.5f, "0.9"), - + /** * Java 1.1. */ diff --git a/src/org/apache/commons/lang3/ObjectUtils.java b/src/org/apache/commons/lang3/ObjectUtils.java index a75184c..21de29a 100644 --- a/src/org/apache/commons/lang3/ObjectUtils.java +++ b/src/org/apache/commons/lang3/ObjectUtils.java @@ -201,7 +201,7 @@ public class ObjectUtils { /** * <p>Gets the hash code for multiple objects.</p> - * + * * <p>This allows a hash code to be rapidly calculated for a number of objects. * The hash code for a single object is the <em>not</em> same as {@link #hashCode(Object)}. * The hash code for multiple objects is the same as that calculated by an @@ -462,7 +462,7 @@ public class ObjectUtils { //----------------------------------------------------------------------- /** * Find the most frequently occurring item. - * + * * @param <T> type of values processed by this method * @param items to check * @return most populous T, {@code null} if non-unique or no items supplied diff --git a/src/org/apache/commons/lang3/StringUtils.java b/src/org/apache/commons/lang3/StringUtils.java index 807f4d6..8eacaab 100644 --- a/src/org/apache/commons/lang3/StringUtils.java +++ b/src/org/apache/commons/lang3/StringUtils.java @@ -3297,7 +3297,7 @@ public class StringUtils { if (noOfItems <= 0) { return EMPTY; } - + StringBuilder buf = new StringBuilder(noOfItems * 16); for (int i = startIndex; i < endIndex; i++) { @@ -3927,7 +3927,7 @@ public class StringUtils { * <p> * A {@code null} reference passed to this method is a no-op, or if * any "search string" or "string to replace" is null, that replace will be - * ignored. + * ignored. * </p> * * <pre> @@ -6097,7 +6097,7 @@ public class StringUtils { } /** - * <p>Find the Levenshtein distance between two Strings if it's less than or equal to a given + * <p>Find the Levenshtein distance between two Strings if it's less than or equal to a given * threshold.</p> * * <p>This is the number of changes needed to change one String into @@ -6139,26 +6139,26 @@ public class StringUtils { /* This implementation only computes the distance if it's less than or equal to the threshold value, returning -1 if it's greater. The advantage is performance: unbounded - distance is O(nm), but a bound of k allows us to reduce it to O(km) time by only + distance is O(nm), but a bound of k allows us to reduce it to O(km) time by only computing a diagonal stripe of width 2k + 1 of the cost table. It is also possible to use this to compute the unbounded Levenshtein distance by starting the threshold at 1 and doubling each time until the distance is found; this is O(dm), where d is the distance. - + One subtlety comes from needing to ignore entries on the border of our stripe eg. p[] = |#|#|#|* d[] = *|#|#|#| We must ignore the entry to the left of the leftmost member We must ignore the entry above the rightmost member - + Another subtlety comes from our stripe running off the matrix if the strings aren't - of the same size. Since string s is always swapped to be the shorter of the two, + of the same size. Since string s is always swapped to be the shorter of the two, the stripe will always run off to the upper right instead of the lower left of the matrix. - + As a concrete example, suppose s is of length 5, t is of length 7, and our threshold is 1. In this case we're going to walk a stripe of length 3. The matrix would look like so: - + 1 2 3 4 5 1 |#|#| | | | 2 |#|#|#| | | @@ -6170,10 +6170,10 @@ public class StringUtils { Note how the stripe leads off the table as there is no possible way to turn a string of length 5 into one of length 7 in edit distance of 1. - - Additionally, this implementation decreases memory usage by using two + + Additionally, this implementation decreases memory usage by using two single-dimensional arrays and swapping them back and forth instead of allocating - an entire n by m matrix. This requires a few minor changes, such as immediately returning + an entire n by m matrix. This requires a few minor changes, such as immediately returning when it's detected that the stripe has run off the matrix and initially filling the arrays with large values so that entries we don't compute are ignored. @@ -6208,7 +6208,7 @@ public class StringUtils { for (int i = 0; i < boundary; i++) { p[i] = i; } - // these fills ensure that the value above the rightmost entry of our + // these fills ensure that the value above the rightmost entry of our // stripe will be ignored in following loop iterations Arrays.fill(p, boundary, p.length, Integer.MAX_VALUE); Arrays.fill(d, Integer.MAX_VALUE); diff --git a/src/org/apache/commons/lang3/builder/Builder.java b/src/org/apache/commons/lang3/builder/Builder.java index 1d9037e..1bd8f0c 100644 --- a/src/org/apache/commons/lang3/builder/Builder.java +++ b/src/org/apache/commons/lang3/builder/Builder.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,52 +18,52 @@ package org.apache.commons.lang3.builder; /** * <p> - * The Builder interface is designed to designate a class as a <em>builder</em> - * object in the Builder design pattern. Builders are capable of creating and - * configuring objects or results that normally take multiple steps to construct - * or are very complex to derive. + * The Builder interface is designed to designate a class as a <em>builder</em> + * object in the Builder design pattern. Builders are capable of creating and + * configuring objects or results that normally take multiple steps to construct + * or are very complex to derive. * </p> - * + * * <p> - * The builder interface defines a single method, {@link #build()}, that - * classes must implement. The result of this method should be the final + * The builder interface defines a single method, {@link #build()}, that + * classes must implement. The result of this method should be the final * configured object or result after all building operations are performed. * </p> - * + * * <p> - * It is a recommended practice that the methods supplied to configure the + * It is a recommended practice that the methods supplied to configure the * object or result being built return a reference to {@code this} so that * method calls can be chained together. * </p> - * + * * <p> * Example Builder: * <code><pre> * class FontBuilder implements Builder<Font> { * private Font font; - * + * * public FontBuilder(String fontName) { * this.font = new Font(fontName, Font.PLAIN, 12); * } - * + * * public FontBuilder bold() { * this.font = this.font.deriveFont(Font.BOLD); * return this; // Reference returned so calls can be chained * } - * + * * public FontBuilder size(float pointSize) { * this.font = this.font.deriveFont(pointSize); * return this; // Reference returned so calls can be chained * } - * + * * // Other Font construction methods - * + * * public Font build() { * return this.font; * } * } * </pre></code> - * + * * Example Builder Usage: * <code><pre> * Font bold14ptSansSerifFont = new FontBuilder(Font.SANS_SERIF).bold() @@ -71,18 +71,18 @@ package org.apache.commons.lang3.builder; * .build(); * </pre></code> * </p> - * + * * @param <T> the type of object that the builder will construct or compute. - * + * * @since 3.0 * @version $Id: Builder.java 1088899 2011-04-05 05:31:27Z bayard $ */ public interface Builder<T> { /** - * Returns a reference to the object being constructed or result being + * Returns a reference to the object being constructed or result being * calculated by the builder. - * + * * @return the object constructed or result calculated by the builder. */ public T build(); diff --git a/src/org/apache/commons/lang3/builder/CompareToBuilder.java b/src/org/apache/commons/lang3/builder/CompareToBuilder.java index 7d86d98..3f87f70 100644 --- a/src/org/apache/commons/lang3/builder/CompareToBuilder.java +++ b/src/org/apache/commons/lang3/builder/CompareToBuilder.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,7 +24,7 @@ import java.util.Comparator; import org.apache.commons.lang3.ArrayUtils; -/** +/** * Assists in implementing {@link java.lang.Comparable#compareTo(Object)} methods. * * It is consistent with <code>equals(Object)</code> and @@ -86,7 +86,7 @@ import org.apache.commons.lang3.ArrayUtils; * @version $Id: CompareToBuilder.java 1090813 2011-04-10 15:03:23Z mbenson $ */ public class CompareToBuilder implements Builder<Integer> { - + /** * Current state of the comparison as appended fields are checked. */ @@ -95,8 +95,8 @@ public class CompareToBuilder implements Builder<Integer> { /** * <p>Constructor for CompareToBuilder.</p> * - * <p>Starts off assuming that the objects are equal. Multiple calls are - * then made to the various append methods, followed by a call to + * <p>Starts off assuming that the objects are equal. Multiple calls are + * then made to the various append methods, followed by a call to * {@link #toComparison} to get the result.</p> */ public CompareToBuilder() { @@ -105,11 +105,11 @@ public class CompareToBuilder implements Builder<Integer> { } //----------------------------------------------------------------------- - /** + /** * <p>Compares two <code>Object</code>s via reflection.</p> * * <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code> - * is used to bypass normal access control checks. This will fail under a + * is used to bypass normal access control checks. This will fail under a * security manager unless the appropriate permissions are set.</p> * * <ul> @@ -139,7 +139,7 @@ public class CompareToBuilder implements Builder<Integer> { * <p>Compares two <code>Object</code>s via reflection.</p> * * <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code> - * is used to bypass normal access control checks. This will fail under a + * is used to bypass normal access control checks. This will fail under a * security manager unless the appropriate permissions are set.</p> * * <ul> @@ -171,7 +171,7 @@ public class CompareToBuilder implements Builder<Integer> { * <p>Compares two <code>Object</code>s via reflection.</p> * * <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code> - * is used to bypass normal access control checks. This will fail under a + * is used to bypass normal access control checks. This will fail under a * security manager unless the appropriate permissions are set.</p> * * <ul> @@ -204,7 +204,7 @@ public class CompareToBuilder implements Builder<Integer> { * <p>Compares two <code>Object</code>s via reflection.</p> * * <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code> - * is used to bypass normal access control checks. This will fail under a + * is used to bypass normal access control checks. This will fail under a * security manager unless the appropriate permissions are set.</p> * * <ul> @@ -237,7 +237,7 @@ public class CompareToBuilder implements Builder<Integer> { * <p>Compares two <code>Object</code>s via reflection.</p> * * <p>Fields can be private, thus <code>AccessibleObject.setAccessible</code> - * is used to bypass normal access control checks. This will fail under a + * is used to bypass normal access control checks. This will fail under a * security manager unless the appropriate permissions are set.</p> * * <ul> @@ -266,10 +266,10 @@ public class CompareToBuilder implements Builder<Integer> { * @since 2.2 (2.0 as <code>reflectionCompare(Object, Object, boolean, Class)</code>) */ public static int reflectionCompare( - Object lhs, - Object rhs, - boolean compareTransients, - Class<?> reflectUpToClass, + Object lhs, + Object rhs, + boolean compareTransients, + Class<?> reflectUpToClass, String... excludeFields) { if (lhs == rhs) { @@ -294,7 +294,7 @@ public class CompareToBuilder implements Builder<Integer> { /** * <p>Appends to <code>builder</code> the comparison of <code>lhs</code> * to <code>rhs</code> using the fields defined in <code>clazz</code>.</p> - * + * * @param lhs left-hand object * @param rhs right-hand object * @param clazz <code>Class</code> that defines fields to be compared @@ -309,7 +309,7 @@ public class CompareToBuilder implements Builder<Integer> { CompareToBuilder builder, boolean useTransients, String[] excludeFields) { - + Field[] fields = clazz.getDeclaredFields(); AccessibleObject.setAccessible(fields, true); for (int i = 0; i < fields.length && builder.comparison == 0; i++) { @@ -345,7 +345,7 @@ public class CompareToBuilder implements Builder<Integer> { comparison = superCompareTo; return this; } - + //----------------------------------------------------------------------- /** * <p>Appends to the <code>builder</code> the comparison of @@ -357,7 +357,7 @@ public class CompareToBuilder implements Builder<Integer> { * a <code>null</code> object is less than a non-<code>null</code> object</li> * <li>Check the object contents</li> * </ol> - * + * * <p><code>lhs</code> must either be an array or implement {@link Comparable}.</p> * * @param lhs left-hand object @@ -486,7 +486,7 @@ public class CompareToBuilder implements Builder<Integer> { /** * Appends to the <code>builder</code> the comparison of * two <code>short</code>s. - * + * * @param lhs left-hand value * @param rhs right-hand value * @return this - used to chain append calls @@ -518,7 +518,7 @@ public class CompareToBuilder implements Builder<Integer> { /** * Appends to the <code>builder</code> the comparison of * two <code>byte</code>s. - * + * * @param lhs left-hand value * @param rhs right-hand value * @return this - used to chain append calls @@ -620,7 +620,7 @@ public class CompareToBuilder implements Builder<Integer> { public CompareToBuilder append(Object[] lhs, Object[] rhs) { return append(lhs, rhs, null); } - + /** * <p>Appends to the <code>builder</code> the deep comparison of * two <code>Object</code> arrays.</p> @@ -995,7 +995,7 @@ public class CompareToBuilder implements Builder<Integer> { * the <code>builder</code> has judged the "left-hand" side * as less than, greater than, or equal to the "right-hand" * side. - * + * * @return final comparison result */ public int toComparison() { @@ -1007,9 +1007,9 @@ public class CompareToBuilder implements Builder<Integer> { * the <code>builder</code> has judged the "left-hand" side * as less than, greater than, or equal to the "right-hand" * side. - * + * * @return final comparison result - * + * * @since 3.0 */ public Integer build() { diff --git a/src/org/apache/commons/lang3/builder/IDKey.java b/src/org/apache/commons/lang3/builder/IDKey.java index 6b1d4ee..2db08ad 100644 --- a/src/org/apache/commons/lang3/builder/IDKey.java +++ b/src/org/apache/commons/lang3/builder/IDKey.java @@ -13,7 +13,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * */ package org.apache.commons.lang3.builder; @@ -21,13 +21,13 @@ package org.apache.commons.lang3.builder; // adapted from org.apache.axis.utils.IDKey /** - * Wrap an identity key (System.identityHashCode()) + * Wrap an identity key (System.identityHashCode()) * so that an object can only be equal() to itself. - * + * * This is necessary to disambiguate the occasional duplicate * identityHashCodes that can occur. - * - */ + * + */ final class IDKey { private final Object value; private final int id; @@ -35,12 +35,12 @@ final class IDKey { /** * Constructor for IDKey * @param _value The value - */ + */ public IDKey(Object _value) { - // This is the Object hashcode - id = System.identityHashCode(_value); - // There have been some cases (LANG-459) that return the - // same identity hash code for different objects. So + // This is the Object hashcode + id = System.identityHashCode(_value); + // There have been some cases (LANG-459) that return the + // same identity hash code for different objects. So // the value is also added to disambiguate these cases. value = _value; } @@ -48,7 +48,7 @@ final class IDKey { /** * returns hashcode - i.e. the system identity hashcode. * @return the hashcode - */ + */ @Override public int hashCode() { return id; @@ -58,7 +58,7 @@ final class IDKey { * checks if instances are equal * @param other The other object to compare to * @return if the instances are for the same object - */ + */ @Override public boolean equals(Object other) { if (!(other instanceof IDKey)) { diff --git a/src/org/apache/commons/lang3/builder/StandardToStringStyle.java b/src/org/apache/commons/lang3/builder/StandardToStringStyle.java index cec4f09..a6bf63d 100644 --- a/src/org/apache/commons/lang3/builder/StandardToStringStyle.java +++ b/src/org/apache/commons/lang3/builder/StandardToStringStyle.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,10 +29,10 @@ package org.apache.commons.lang3.builder; * @version $Id: StandardToStringStyle.java 1089740 2011-04-07 05:01:54Z bayard $ */ public class StandardToStringStyle extends ToStringStyle { - + /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = 1L; @@ -43,9 +43,9 @@ public class StandardToStringStyle extends ToStringStyle { public StandardToStringStyle() { super(); } - + //--------------------------------------------------------------------- - + /** * <p>Gets whether to use the class name.</p> * @@ -67,7 +67,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets whether to output short or long class names.</p> * @@ -91,7 +91,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets whether to use the identity hash code.</p> * @return the current useIdentityHashCode flag @@ -112,7 +112,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets whether to use the field names passed in.</p> * @@ -134,7 +134,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets whether to use full detail when the caller doesn't * specify.</p> @@ -158,7 +158,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets whether to output array content detail.</p> * @@ -168,7 +168,7 @@ public class StandardToStringStyle extends ToStringStyle { public boolean isArrayContentDetail() { // NOPMD as this is implementing the abstract class return super.isArrayContentDetail(); } - + /** * <p>Sets whether to output array content detail.</p> * @@ -180,7 +180,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the array start text.</p> * @@ -205,7 +205,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the array end text.</p> * @@ -230,7 +230,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the array separator text.</p> * @@ -255,7 +255,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the content start text.</p> * @@ -280,7 +280,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the content end text.</p> * @@ -305,7 +305,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the field name value separator text.</p> * @@ -330,7 +330,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the field separator text.</p> * @@ -355,11 +355,11 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** - * <p>Gets whether the field separator should be added at the start + * <p>Gets whether the field separator should be added at the start * of each buffer.</p> - * + * * @return the fieldSeparatorAtStart flag * @since 2.0 */ @@ -369,9 +369,9 @@ public class StandardToStringStyle extends ToStringStyle { } /** - * <p>Sets whether the field separator should be added at the start + * <p>Sets whether the field separator should be added at the start * of each buffer.</p> - * + * * @param fieldSeparatorAtStart the fieldSeparatorAtStart flag * @since 2.0 */ @@ -381,11 +381,11 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** - * <p>Gets whether the field separator should be added at the end + * <p>Gets whether the field separator should be added at the end * of each buffer.</p> - * + * * @return fieldSeparatorAtEnd flag * @since 2.0 */ @@ -395,9 +395,9 @@ public class StandardToStringStyle extends ToStringStyle { } /** - * <p>Sets whether the field separator should be added at the end + * <p>Sets whether the field separator should be added at the end * of each buffer.</p> - * + * * @param fieldSeparatorAtEnd the fieldSeparatorAtEnd flag * @since 2.0 */ @@ -407,7 +407,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the text to output when <code>null</code> found.</p> * @@ -432,7 +432,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the text to output when a <code>Collection</code>, * <code>Map</code> or <code>Array</code> size is output.</p> @@ -463,7 +463,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * Gets the end text to output when a <code>Collection</code>, * <code>Map</code> or <code>Array</code> size is output.</p> @@ -494,7 +494,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the start text to output when an <code>Object</code> is * output in summary mode.</p> @@ -525,7 +525,7 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + /** * <p>Gets the end text to output when an <code>Object</code> is * output in summary mode.</p> @@ -556,5 +556,5 @@ public class StandardToStringStyle extends ToStringStyle { } //--------------------------------------------------------------------- - + } diff --git a/src/org/apache/commons/lang3/exception/CloneFailedException.java b/src/org/apache/commons/lang3/exception/CloneFailedException.java index 138b250..ae534b4 100644 --- a/src/org/apache/commons/lang3/exception/CloneFailedException.java +++ b/src/org/apache/commons/lang3/exception/CloneFailedException.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,7 +19,7 @@ package org.apache.commons.lang3.exception; /** * Exception thrown when a clone cannot be created. In contrast to * {@link CloneNotSupportedException} this is a {@link RuntimeException}. - * + * * @since 3.0 */ public class CloneFailedException extends RuntimeException { @@ -31,7 +31,7 @@ public class CloneFailedException extends RuntimeException { /** * Constructs a CloneFailedException. - * + * * @param message description of the exception * @since upcoming */ @@ -41,7 +41,7 @@ public class CloneFailedException extends RuntimeException { /** * Constructs a CloneFailedException. - * + * * @param cause cause of the exception * @since upcoming */ @@ -51,7 +51,7 @@ public class CloneFailedException extends RuntimeException { /** * Constructs a CloneFailedException. - * + * * @param message description of the exception * @param cause cause of the exception * @since upcoming diff --git a/src/org/apache/commons/lang3/exception/ContextedException.java b/src/org/apache/commons/lang3/exception/ContextedException.java index a910024..ac20580 100644 --- a/src/org/apache/commons/lang3/exception/ContextedException.java +++ b/src/org/apache/commons/lang3/exception/ContextedException.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -77,7 +77,7 @@ import org.apache.commons.lang3.tuple.Pair; * ..... (rest of trace) * </pre> * </p> - * + * * @see ContextedRuntimeException * @since 3.0 */ @@ -102,7 +102,7 @@ public class ContextedException extends Exception implements ExceptionContext { * Instantiates ContextedException with message, but without cause. * <p> * The context information is stored using a default implementation. - * + * * @param message the exception message, may be null */ public ContextedException(String message) { @@ -114,7 +114,7 @@ public class ContextedException extends Exception implements ExceptionContext { * Instantiates ContextedException with cause, but without message. * <p> * The context information is stored using a default implementation. - * + * * @param cause the underlying cause of the exception, may be null */ public ContextedException(Throwable cause) { @@ -126,7 +126,7 @@ public class ContextedException extends Exception implements ExceptionContext { * Instantiates ContextedException with cause and message. * <p> * The context information is stored using a default implementation. - * + * * @param message the exception message, may be null * @param cause the underlying cause of the exception, may be null */ @@ -137,7 +137,7 @@ public class ContextedException extends Exception implements ExceptionContext { /** * Instantiates ContextedException with cause, message, and ExceptionContext. - * + * * @param message the exception message, may be null * @param cause the underlying cause of the exception, may be null * @param context the context used to store the additional information, null uses default implementation @@ -159,12 +159,12 @@ public class ContextedException extends Exception implements ExceptionContext { * <p> * Note: This exception is only serializable if the object added is serializable. * </p> - * + * * @param label a textual label associated with information, {@code null} not recommended * @param value information needed to understand exception, may be {@code null} * @return {@code this}, for method chaining, not {@code null} */ - public ContextedException addContextValue(String label, Object value) { + public ContextedException addContextValue(String label, Object value) { exceptionContext.addContextValue(label, value); return this; } @@ -177,12 +177,12 @@ public class ContextedException extends Exception implements ExceptionContext { * <p> * Note: This exception is only serializable if the object added as value is serializable. * </p> - * + * * @param label a textual label associated with information, {@code null} not recommended * @param value information needed to understand exception, may be {@code null} * @return {@code this}, for method chaining, not {@code null} */ - public ContextedException setContextValue(String label, Object value) { + public ContextedException setContextValue(String label, Object value) { exceptionContext.setContextValue(label, value); return this; } @@ -217,7 +217,7 @@ public class ContextedException extends Exception implements ExceptionContext { /** * Provides the message explaining the exception, including the contextual data. - * + * * @see java.lang.Throwable#getMessage() * @return the message, never null */ @@ -228,7 +228,7 @@ public class ContextedException extends Exception implements ExceptionContext { /** * Provides the message explaining the exception without the contextual data. - * + * * @see java.lang.Throwable#getMessage() * @return the message * @since 3.0.1 diff --git a/src/org/apache/commons/lang3/exception/ContextedRuntimeException.java b/src/org/apache/commons/lang3/exception/ContextedRuntimeException.java index c8e2a29..9699b82 100644 --- a/src/org/apache/commons/lang3/exception/ContextedRuntimeException.java +++ b/src/org/apache/commons/lang3/exception/ContextedRuntimeException.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -77,7 +77,7 @@ import org.apache.commons.lang3.tuple.Pair; * ..... (rest of trace) * </pre> * </p> - * + * * @see ContextedException * @since 3.0 */ @@ -102,7 +102,7 @@ public class ContextedRuntimeException extends RuntimeException implements Excep * Instantiates ContextedRuntimeException with message, but without cause. * <p> * The context information is stored using a default implementation. - * + * * @param message the exception message, may be null */ public ContextedRuntimeException(String message) { @@ -114,7 +114,7 @@ public class ContextedRuntimeException extends RuntimeException implements Excep * Instantiates ContextedRuntimeException with cause, but without message. * <p> * The context information is stored using a default implementation. - * + * * @param cause the underlying cause of the exception, may be null */ public ContextedRuntimeException(Throwable cause) { @@ -126,7 +126,7 @@ public class ContextedRuntimeException extends RuntimeException implements Excep * Instantiates ContextedRuntimeException with cause and message. * <p> * The context information is stored using a default implementation. - * + * * @param message the exception message, may be null * @param cause the underlying cause of the exception, may be null */ @@ -137,7 +137,7 @@ public class ContextedRuntimeException extends RuntimeException implements Excep /** * Instantiates ContextedRuntimeException with cause, message, and ExceptionContext. - * + * * @param message the exception message, may be null * @param cause the underlying cause of the exception, may be null * @param context the context used to store the additional information, null uses default implementation @@ -159,12 +159,12 @@ public class ContextedRuntimeException extends RuntimeException implements Excep * <p> * Note: This exception is only serializable if the object added is serializable. * </p> - * + * * @param label a textual label associated with information, {@code null} not recommended * @param value information needed to understand exception, may be {@code null} * @return {@code this}, for method chaining, not {@code null} */ - public ContextedRuntimeException addContextValue(String label, Object value) { + public ContextedRuntimeException addContextValue(String label, Object value) { exceptionContext.addContextValue(label, value); return this; } @@ -177,12 +177,12 @@ public class ContextedRuntimeException extends RuntimeException implements Excep * <p> * Note: This exception is only serializable if the object added as value is serializable. * </p> - * + * * @param label a textual label associated with information, {@code null} not recommended * @param value information needed to understand exception, may be {@code null} * @return {@code this}, for method chaining, not {@code null} */ - public ContextedRuntimeException setContextValue(String label, Object value) { + public ContextedRuntimeException setContextValue(String label, Object value) { exceptionContext.setContextValue(label, value); return this; } @@ -217,7 +217,7 @@ public class ContextedRuntimeException extends RuntimeException implements Excep /** * Provides the message explaining the exception, including the contextual data. - * + * * @see java.lang.Throwable#getMessage() * @return the message, never null */ @@ -228,7 +228,7 @@ public class ContextedRuntimeException extends RuntimeException implements Excep /** * Provides the message explaining the exception without the contextual data. - * + * * @see java.lang.Throwable#getMessage() * @return the message * @since 3.0.1 diff --git a/src/org/apache/commons/lang3/exception/DefaultExceptionContext.java b/src/org/apache/commons/lang3/exception/DefaultExceptionContext.java index fc5dc52..c6e2535 100644 --- a/src/org/apache/commons/lang3/exception/DefaultExceptionContext.java +++ b/src/org/apache/commons/lang3/exception/DefaultExceptionContext.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,7 +33,7 @@ import org.apache.commons.lang3.tuple.Pair; * This implementation is serializable, however this is dependent on the values that * are added also being serializable. * </p> - * + * * @see ContextedException * @see ContextedRuntimeException * @since 3.0 @@ -113,7 +113,7 @@ public class DefaultExceptionContext implements ExceptionContext, Serializable { /** * Builds the message containing the contextual information. - * + * * @param baseMessage the base exception message <b>without</b> context information appended * @return the exception message <b>with</b> context information appended, never null */ @@ -122,13 +122,13 @@ public class DefaultExceptionContext implements ExceptionContext, Serializable { if (baseMessage != null) { buffer.append(baseMessage); } - + if (contextValues.size() > 0) { if (buffer.length() > 0) { buffer.append('\n'); } buffer.append("Exception Context:\n"); - + int i = 0; for (final Pair<String, Object> pair : contextValues) { buffer.append("\t["); diff --git a/src/org/apache/commons/lang3/exception/ExceptionContext.java b/src/org/apache/commons/lang3/exception/ExceptionContext.java index 719dad5..2381139 100644 --- a/src/org/apache/commons/lang3/exception/ExceptionContext.java +++ b/src/org/apache/commons/lang3/exception/ExceptionContext.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,7 +28,7 @@ import org.apache.commons.lang3.tuple.Pair; * Implementations are expected to manage the pairs in a list-style collection * that keeps the pairs in the sequence of their addition. * </p> - * + * * @see ContextedException * @see ContextedRuntimeException * @since 3.0 @@ -41,7 +41,7 @@ public interface ExceptionContext { * The pair will be added to the context, independently of an already * existing pair with the same label. * </p> - * + * * @param label the label of the item to add, {@code null} not recommended * @param value the value of item to add, may be {@code null} * @return {@code this}, for method chaining, not {@code null} @@ -54,7 +54,7 @@ public interface ExceptionContext { * The pair will be added normally, but any existing label-value pair with * the same label is removed from the context. * </p> - * + * * @param label the label of the item to add, {@code null} not recommended * @param value the value of item to add, may be {@code null} * @return {@code this}, for method chaining, not {@code null} @@ -63,7 +63,7 @@ public interface ExceptionContext { /** * Retrieves all the contextual data values associated with the label. - * + * * @param label the label to get the contextual values for, may be {@code null} * @return the contextual values associated with the label, never {@code null} */ @@ -71,7 +71,7 @@ public interface ExceptionContext { /** * Retrieves the first available contextual data value associated with the label. - * + * * @param label the label to get the contextual value for, may be {@code null} * @return the first contextual value associated with the label, may be {@code null} */ @@ -79,14 +79,14 @@ public interface ExceptionContext { /** * Retrieves the full set of labels defined in the contextual data. - * + * * @return the set of labels, not {@code null} */ public Set<String> getContextLabels(); /** * Retrieves the full list of label-value pairs defined in the contextual data. - * + * * @return the list of pairs, not {@code null} */ public List<Pair<String, Object>> getContextEntries(); @@ -94,7 +94,7 @@ public interface ExceptionContext { /** * Gets the contextualized error message based on a base message. * This will add the context label-value pairs to the message. - * + * * @param baseMessage the base exception message <b>without</b> context information appended * @return the exception message <b>with</b> context information appended, not {@code null} */ diff --git a/src/org/apache/commons/lang3/exception/ExceptionUtils.java b/src/org/apache/commons/lang3/exception/ExceptionUtils.java index 9adfcd9..de752a0 100644 --- a/src/org/apache/commons/lang3/exception/ExceptionUtils.java +++ b/src/org/apache/commons/lang3/exception/ExceptionUtils.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,14 +31,14 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.SystemUtils; /** - * <p>Provides utilities for manipulating and examining + * <p>Provides utilities for manipulating and examining * <code>Throwable</code> objects.</p> * * @since 1.0 * @version $Id: ExceptionUtils.java 1144929 2011-07-10 18:26:16Z ggregory $ */ public class ExceptionUtils { - + /** * <p>Used when printing stack frames to denote the start of a * wrapped exception.</p> @@ -95,7 +95,7 @@ public class ExceptionUtils { /** * <p>Introspects the <code>Throwable</code> to obtain the cause.</p> * - * <p>The method searches for methods with specific names that return a + * <p>The method searches for methods with specific names that return a * <code>Throwable</code> object. This will pick up most wrapping exceptions, * including those from JDK 1.4. * @@ -110,7 +110,7 @@ public class ExceptionUtils { * <li><code>getCausedByException()</code></li> * <li><code>getNested()</code></li> * </ul> - * + * * <p>If none of the above is found, returns <code>null</code>.</p> * * @param throwable the throwable to introspect for a cause, may be null @@ -633,7 +633,7 @@ public class ExceptionUtils { * <p>This works in most cases - it will only fail if the exception * message contains a line that starts with: * <code>" at".</code></p> - * + * * @param t is any throwable * @return List of stack frames */ diff --git a/src/org/apache/commons/lang3/mutable/Mutable.java b/src/org/apache/commons/lang3/mutable/Mutable.java index 25a78f2..19a736e 100644 --- a/src/org/apache/commons/lang3/mutable/Mutable.java +++ b/src/org/apache/commons/lang3/mutable/Mutable.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,23 +25,23 @@ package org.apache.commons.lang3.mutable; * A typical use case would be to enable a primitive or string to be passed to a method and allow that method to * effectively change the value of the primitive/string. Another use case is to store a frequently changing primitive in * a collection (for example a total in a map) without needing to create new Integer/Long wrapper objects. - * + * * @since 2.1 - * @param <T> the type to set and get + * @param <T> the type to set and get * @version $Id: Mutable.java 1153213 2011-08-02 17:35:39Z ggregory $ */ public interface Mutable<T> { /** * Gets the value of this mutable. - * + * * @return the stored value */ T getValue(); /** * Sets the value of this mutable. - * + * * @param value * the value to store * @throws NullPointerException diff --git a/src/org/apache/commons/lang3/mutable/MutableBoolean.java b/src/org/apache/commons/lang3/mutable/MutableBoolean.java index 6a12b61..c52afe6 100644 --- a/src/org/apache/commons/lang3/mutable/MutableBoolean.java +++ b/src/org/apache/commons/lang3/mutable/MutableBoolean.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,8 +22,8 @@ import java.io.Serializable; /** * A mutable <code>boolean</code> wrapper. * <p> - * Note that as MutableBoolean does not extend Boolean, it is not treated by String.format as a Boolean parameter. - * + * Note that as MutableBoolean does not extend Boolean, it is not treated by String.format as a Boolean parameter. + * * @see Boolean * @since 2.2 * @version $Id: MutableBoolean.java 1160571 2011-08-23 07:36:08Z bayard $ @@ -32,7 +32,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = -4830728138360036487L; @@ -49,7 +49,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl /** * Constructs a new MutableBoolean with the specified value. - * + * * @param value the initial value to store */ public MutableBoolean(boolean value) { @@ -59,7 +59,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl /** * Constructs a new MutableBoolean with the specified value. - * + * * @param value the initial value to store, not null * @throws NullPointerException if the object is null */ @@ -71,7 +71,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl //----------------------------------------------------------------------- /** * Gets the value as a Boolean instance. - * + * * @return the value as a Boolean, never null */ public Boolean getValue() { @@ -80,7 +80,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl /** * Sets the value. - * + * * @param value the value to set */ public void setValue(boolean value) { @@ -89,7 +89,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl /** * Sets the value from any Boolean instance. - * + * * @param value the value to set, not null * @throws NullPointerException if the object is null */ @@ -100,7 +100,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl //----------------------------------------------------------------------- /** * Checks if the current value is <code>true</code>. - * + * * @return <code>true</code> if the current value is <code>true</code> * @since 2.5 */ @@ -110,7 +110,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl /** * Checks if the current value is <code>false</code>. - * + * * @return <code>true</code> if the current value is <code>false</code> * @since 2.5 */ @@ -121,7 +121,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl //----------------------------------------------------------------------- /** * Returns the value of this MutableBoolean as a boolean. - * + * * @return the boolean value represented by this object. */ public boolean booleanValue() { @@ -144,7 +144,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl * Compares this object to the specified object. The result is <code>true</code> if and only if the argument is * not <code>null</code> and is an <code>MutableBoolean</code> object that contains the same * <code>boolean</code> value as this object. - * + * * @param obj the object to compare with, null returns false * @return <code>true</code> if the objects are the same; <code>false</code> otherwise. */ @@ -158,7 +158,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl /** * Returns a suitable hash code for this mutable. - * + * * @return the hash code returned by <code>Boolean.TRUE</code> or <code>Boolean.FALSE</code> */ @Override @@ -169,7 +169,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl //----------------------------------------------------------------------- /** * Compares this mutable to another in ascending order. - * + * * @param other the other mutable to compare to, not null * @return negative if this is less, zero if equal, positive if greater * where false is less than true @@ -182,7 +182,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl //----------------------------------------------------------------------- /** * Returns the String value of this mutable. - * + * * @return the mutable value as a string */ @Override diff --git a/src/org/apache/commons/lang3/mutable/MutableByte.java b/src/org/apache/commons/lang3/mutable/MutableByte.java index 0a50108..57274de 100644 --- a/src/org/apache/commons/lang3/mutable/MutableByte.java +++ b/src/org/apache/commons/lang3/mutable/MutableByte.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,8 +19,8 @@ package org.apache.commons.lang3.mutable; /** * A mutable <code>byte</code> wrapper. * <p> - * Note that as MutableByte does not extend Byte, it is not treated by String.format as a Byte parameter. - * + * Note that as MutableByte does not extend Byte, it is not treated by String.format as a Byte parameter. + * * @see Byte * @since 2.1 * @version $Id: MutableByte.java 1160571 2011-08-23 07:36:08Z bayard $ @@ -29,7 +29,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = -1585823265L; @@ -46,7 +46,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta /** * Constructs a new MutableByte with the specified value. - * + * * @param value the initial value to store */ public MutableByte(byte value) { @@ -56,7 +56,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta /** * Constructs a new MutableByte with the specified value. - * + * * @param value the initial value to store, not null * @throws NullPointerException if the object is null */ @@ -67,7 +67,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta /** * Constructs a new MutableByte parsing the given string. - * + * * @param value the string to parse, not null * @throws NumberFormatException if the string cannot be parsed into a byte * @since 2.5 @@ -80,7 +80,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta //----------------------------------------------------------------------- /** * Gets the value as a Byte instance. - * + * * @return the value as a Byte, never null */ public Byte getValue() { @@ -89,7 +89,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta /** * Sets the value. - * + * * @param value the value to set */ public void setValue(byte value) { @@ -98,7 +98,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta /** * Sets the value from any Number instance. - * + * * @param value the value to set, not null * @throws NullPointerException if the object is null */ @@ -128,7 +128,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta //----------------------------------------------------------------------- /** * Adds a value to the value of this instance. - * + * * @param operand the value to add, not null * @since Commons Lang 2.2 */ @@ -138,7 +138,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta /** * Adds a value to the value of this instance. - * + * * @param operand the value to add, not null * @throws NullPointerException if the object is null * @since Commons Lang 2.2 @@ -149,7 +149,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta /** * Subtracts a value from the value of this instance. - * + * * @param operand the value to subtract, not null * @since Commons Lang 2.2 */ @@ -159,7 +159,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta /** * Subtracts a value from the value of this instance. - * + * * @param operand the value to subtract, not null * @throws NullPointerException if the object is null * @since Commons Lang 2.2 @@ -235,7 +235,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta * Compares this object to the specified object. The result is <code>true</code> if and only if the argument is * not <code>null</code> and is a <code>MutableByte</code> object that contains the same <code>byte</code> value * as this object. - * + * * @param obj the object to compare with, null returns false * @return <code>true</code> if the objects are the same; <code>false</code> otherwise. */ @@ -249,7 +249,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta /** * Returns a suitable hash code for this mutable. - * + * * @return a suitable hash code */ @Override @@ -260,7 +260,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta //----------------------------------------------------------------------- /** * Compares this mutable to another in ascending order. - * + * * @param other the other mutable to compare to, not null * @return negative if this is less, zero if equal, positive if greater */ @@ -272,7 +272,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta //----------------------------------------------------------------------- /** * Returns the String value of this mutable. - * + * * @return the mutable value as a string */ @Override diff --git a/src/org/apache/commons/lang3/mutable/MutableDouble.java b/src/org/apache/commons/lang3/mutable/MutableDouble.java index 588a711..60c19c4 100644 --- a/src/org/apache/commons/lang3/mutable/MutableDouble.java +++ b/src/org/apache/commons/lang3/mutable/MutableDouble.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,8 +19,8 @@ package org.apache.commons.lang3.mutable; /** * A mutable <code>double</code> wrapper. * <p> - * Note that as MutableDouble does not extend Double, it is not treated by String.format as a Double parameter. - * + * Note that as MutableDouble does not extend Double, it is not treated by String.format as a Double parameter. + * * @see Double * @since 2.1 * @version $Id: MutableDouble.java 1160571 2011-08-23 07:36:08Z bayard $ @@ -29,7 +29,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = 1587163916L; @@ -46,7 +46,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Constructs a new MutableDouble with the specified value. - * + * * @param value the initial value to store */ public MutableDouble(double value) { @@ -56,7 +56,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Constructs a new MutableDouble with the specified value. - * + * * @param value the initial value to store, not null * @throws NullPointerException if the object is null */ @@ -67,7 +67,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Constructs a new MutableDouble parsing the given string. - * + * * @param value the string to parse, not null * @throws NumberFormatException if the string cannot be parsed into a double * @since 2.5 @@ -80,7 +80,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, //----------------------------------------------------------------------- /** * Gets the value as a Double instance. - * + * * @return the value as a Double, never null */ public Double getValue() { @@ -89,7 +89,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Sets the value. - * + * * @param value the value to set */ public void setValue(double value) { @@ -98,7 +98,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Sets the value from any Number instance. - * + * * @param value the value to set, not null * @throws NullPointerException if the object is null */ @@ -109,7 +109,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, //----------------------------------------------------------------------- /** * Checks whether the double value is the special NaN value. - * + * * @return true if NaN */ public boolean isNaN() { @@ -118,7 +118,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Checks whether the double value is infinite. - * + * * @return true if infinite */ public boolean isInfinite() { @@ -147,7 +147,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, //----------------------------------------------------------------------- /** * Adds a value to the value of this instance. - * + * * @param operand the value to add * @since Commons Lang 2.2 */ @@ -157,7 +157,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Adds a value to the value of this instance. - * + * * @param operand the value to add, not null * @throws NullPointerException if the object is null * @since Commons Lang 2.2 @@ -168,7 +168,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Subtracts a value from the value of this instance. - * + * * @param operand the value to subtract, not null * @since Commons Lang 2.2 */ @@ -178,7 +178,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Subtracts a value from the value of this instance. - * + * * @param operand the value to subtract, not null * @throws NullPointerException if the object is null * @since Commons Lang 2.2 @@ -249,11 +249,11 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, * <p> * Note that in most cases, for two instances of class <code>Double</code>,<code>d1</code> and <code>d2</code>, * the value of <code>d1.equals(d2)</code> is <code>true</code> if and only if <blockquote> - * + * * <pre> * d1.doubleValue() == d2.doubleValue() * </pre> - * + * * </blockquote> * <p> * also has the value <code>true</code>. However, there are two exceptions: @@ -265,7 +265,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, * or vice versa, the <code>equal</code> test has the value <code>false</code>, even though * <code>+0.0==-0.0</code> has the value <code>true</code>. This allows hashtables to operate properly. * </ul> - * + * * @param obj the object to compare with, null returns false * @return <code>true</code> if the objects are the same; <code>false</code> otherwise. */ @@ -277,7 +277,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Returns a suitable hash code for this mutable. - * + * * @return a suitable hash code */ @Override @@ -289,7 +289,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, //----------------------------------------------------------------------- /** * Compares this mutable to another in ascending order. - * + * * @param other the other mutable to compare to, not null * @return negative if this is less, zero if equal, positive if greater */ @@ -301,7 +301,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, //----------------------------------------------------------------------- /** * Returns the String value of this mutable. - * + * * @return the mutable value as a string */ @Override diff --git a/src/org/apache/commons/lang3/mutable/MutableFloat.java b/src/org/apache/commons/lang3/mutable/MutableFloat.java index 35f233c..3ad9e5d 100644 --- a/src/org/apache/commons/lang3/mutable/MutableFloat.java +++ b/src/org/apache/commons/lang3/mutable/MutableFloat.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,8 +19,8 @@ package org.apache.commons.lang3.mutable; /** * A mutable <code>float</code> wrapper. * <p> - * Note that as MutableFloat does not extend Float, it is not treated by String.format as a Float parameter. - * + * Note that as MutableFloat does not extend Float, it is not treated by String.format as a Float parameter. + * * @see Float * @since 2.1 * @version $Id: MutableFloat.java 1160571 2011-08-23 07:36:08Z bayard $ @@ -29,7 +29,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = 5787169186L; @@ -46,7 +46,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Constructs a new MutableFloat with the specified value. - * + * * @param value the initial value to store */ public MutableFloat(float value) { @@ -56,7 +56,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Constructs a new MutableFloat with the specified value. - * + * * @param value the initial value to store, not null * @throws NullPointerException if the object is null */ @@ -67,7 +67,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Constructs a new MutableFloat parsing the given string. - * + * * @param value the string to parse, not null * @throws NumberFormatException if the string cannot be parsed into a float * @since 2.5 @@ -80,7 +80,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu //----------------------------------------------------------------------- /** * Gets the value as a Float instance. - * + * * @return the value as a Float, never null */ public Float getValue() { @@ -89,7 +89,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Sets the value. - * + * * @param value the value to set */ public void setValue(float value) { @@ -98,7 +98,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Sets the value from any Number instance. - * + * * @param value the value to set, not null * @throws NullPointerException if the object is null */ @@ -109,7 +109,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu //----------------------------------------------------------------------- /** * Checks whether the float value is the special NaN value. - * + * * @return true if NaN */ public boolean isNaN() { @@ -118,7 +118,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Checks whether the float value is infinite. - * + * * @return true if infinite */ public boolean isInfinite() { @@ -147,7 +147,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu //----------------------------------------------------------------------- /** * Adds a value to the value of this instance. - * + * * @param operand the value to add, not null * @since Commons Lang 2.2 */ @@ -157,7 +157,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Adds a value to the value of this instance. - * + * * @param operand the value to add, not null * @throws NullPointerException if the object is null * @since Commons Lang 2.2 @@ -168,7 +168,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Subtracts a value from the value of this instance. - * + * * @param operand the value to subtract * @since Commons Lang 2.2 */ @@ -178,7 +178,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Subtracts a value from the value of this instance. - * + * * @param operand the value to subtract, not null * @throws NullPointerException if the object is null * @since Commons Lang 2.2 @@ -249,11 +249,11 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu * <p> * Note that in most cases, for two instances of class <code>Float</code>,<code>f1</code> and <code>f2</code>, * the value of <code>f1.equals(f2)</code> is <code>true</code> if and only if <blockquote> - * + * * <pre> * f1.floatValue() == f2.floatValue() * </pre> - * + * * </blockquote> * <p> * also has the value <code>true</code>. However, there are two exceptions: @@ -266,7 +266,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu * <code>0.0f==-0.0f</code> has the value <code>true</code>. * </ul> * This definition allows hashtables to operate properly. - * + * * @param obj the object to compare with, null returns false * @return <code>true</code> if the objects are the same; <code>false</code> otherwise. * @see java.lang.Float#floatToIntBits(float) @@ -279,7 +279,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Returns a suitable hash code for this mutable. - * + * * @return a suitable hash code */ @Override @@ -290,7 +290,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu //----------------------------------------------------------------------- /** * Compares this mutable to another in ascending order. - * + * * @param other the other mutable to compare to, not null * @return negative if this is less, zero if equal, positive if greater */ @@ -302,7 +302,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu //----------------------------------------------------------------------- /** * Returns the String value of this mutable. - * + * * @return the mutable value as a string */ @Override diff --git a/src/org/apache/commons/lang3/mutable/MutableInt.java b/src/org/apache/commons/lang3/mutable/MutableInt.java index 03c0092..301ea39 100644 --- a/src/org/apache/commons/lang3/mutable/MutableInt.java +++ b/src/org/apache/commons/lang3/mutable/MutableInt.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,8 +19,8 @@ package org.apache.commons.lang3.mutable; /** * A mutable <code>int</code> wrapper. * <p> - * Note that as MutableInt does not extend Integer, it is not treated by String.format as an Integer parameter. - * + * Note that as MutableInt does not extend Integer, it is not treated by String.format as an Integer parameter. + * * @see Integer * @since 2.1 * @version $Id: MutableInt.java 1160571 2011-08-23 07:36:08Z bayard $ @@ -29,7 +29,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = 512176391864L; @@ -46,7 +46,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl /** * Constructs a new MutableInt with the specified value. - * + * * @param value the initial value to store */ public MutableInt(int value) { @@ -56,7 +56,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl /** * Constructs a new MutableInt with the specified value. - * + * * @param value the initial value to store, not null * @throws NullPointerException if the object is null */ @@ -67,7 +67,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl /** * Constructs a new MutableInt parsing the given string. - * + * * @param value the string to parse, not null * @throws NumberFormatException if the string cannot be parsed into an int * @since 2.5 @@ -80,7 +80,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl //----------------------------------------------------------------------- /** * Gets the value as a Integer instance. - * + * * @return the value as a Integer, never null */ public Integer getValue() { @@ -89,7 +89,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl /** * Sets the value. - * + * * @param value the value to set */ public void setValue(int value) { @@ -98,7 +98,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl /** * Sets the value from any Number instance. - * + * * @param value the value to set, not null * @throws NullPointerException if the object is null */ @@ -128,7 +128,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl //----------------------------------------------------------------------- /** * Adds a value to the value of this instance. - * + * * @param operand the value to add, not null * @since Commons Lang 2.2 */ @@ -138,7 +138,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl /** * Adds a value to the value of this instance. - * + * * @param operand the value to add, not null * @throws NullPointerException if the object is null * @since Commons Lang 2.2 @@ -149,7 +149,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl /** * Subtracts a value from the value of this instance. - * + * * @param operand the value to subtract, not null * @since Commons Lang 2.2 */ @@ -159,7 +159,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl /** * Subtracts a value from the value of this instance. - * + * * @param operand the value to subtract, not null * @throws NullPointerException if the object is null * @since Commons Lang 2.2 @@ -225,7 +225,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl * Compares this object to the specified object. The result is <code>true</code> if and only if the argument is * not <code>null</code> and is a <code>MutableInt</code> object that contains the same <code>int</code> value * as this object. - * + * * @param obj the object to compare with, null returns false * @return <code>true</code> if the objects are the same; <code>false</code> otherwise. */ @@ -239,7 +239,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl /** * Returns a suitable hash code for this mutable. - * + * * @return a suitable hash code */ @Override @@ -250,7 +250,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl //----------------------------------------------------------------------- /** * Compares this mutable to another in ascending order. - * + * * @param other the other mutable to compare to, not null * @return negative if this is less, zero if equal, positive if greater */ @@ -262,7 +262,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl //----------------------------------------------------------------------- /** * Returns the String value of this mutable. - * + * * @return the mutable value as a string */ @Override diff --git a/src/org/apache/commons/lang3/mutable/MutableLong.java b/src/org/apache/commons/lang3/mutable/MutableLong.java index a4bc52e..2dab12f 100644 --- a/src/org/apache/commons/lang3/mutable/MutableLong.java +++ b/src/org/apache/commons/lang3/mutable/MutableLong.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,8 +19,8 @@ package org.apache.commons.lang3.mutable; /** * A mutable <code>long</code> wrapper. * <p> - * Note that as MutableLong does not extend Long, it is not treated by String.format as a Long parameter. - * + * Note that as MutableLong does not extend Long, it is not treated by String.format as a Long parameter. + * * @see Long * @since 2.1 * @version $Id: MutableLong.java 1160571 2011-08-23 07:36:08Z bayard $ @@ -29,7 +29,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = 62986528375L; @@ -46,7 +46,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta /** * Constructs a new MutableLong with the specified value. - * + * * @param value the initial value to store */ public MutableLong(long value) { @@ -56,7 +56,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta /** * Constructs a new MutableLong with the specified value. - * + * * @param value the initial value to store, not null * @throws NullPointerException if the object is null */ @@ -67,7 +67,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta /** * Constructs a new MutableLong parsing the given string. - * + * * @param value the string to parse, not null * @throws NumberFormatException if the string cannot be parsed into a long * @since 2.5 @@ -80,7 +80,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta //----------------------------------------------------------------------- /** * Gets the value as a Long instance. - * + * * @return the value as a Long, never null */ public Long getValue() { @@ -89,7 +89,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta /** * Sets the value. - * + * * @param value the value to set */ public void setValue(long value) { @@ -98,7 +98,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta /** * Sets the value from any Number instance. - * + * * @param value the value to set, not null * @throws NullPointerException if the object is null */ @@ -128,7 +128,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta //----------------------------------------------------------------------- /** * Adds a value to the value of this instance. - * + * * @param operand the value to add, not null * @since Commons Lang 2.2 */ @@ -138,7 +138,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta /** * Adds a value to the value of this instance. - * + * * @param operand the value to add, not null * @throws NullPointerException if the object is null * @since Commons Lang 2.2 @@ -149,7 +149,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta /** * Subtracts a value from the value of this instance. - * + * * @param operand the value to subtract, not null * @since Commons Lang 2.2 */ @@ -159,7 +159,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta /** * Subtracts a value from the value of this instance. - * + * * @param operand the value to subtract, not null * @throws NullPointerException if the object is null * @since Commons Lang 2.2 @@ -225,7 +225,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta * Compares this object to the specified object. The result is <code>true</code> if and only if the argument * is not <code>null</code> and is a <code>MutableLong</code> object that contains the same <code>long</code> * value as this object. - * + * * @param obj the object to compare with, null returns false * @return <code>true</code> if the objects are the same; <code>false</code> otherwise. */ @@ -239,7 +239,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta /** * Returns a suitable hash code for this mutable. - * + * * @return a suitable hash code */ @Override @@ -250,7 +250,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta //----------------------------------------------------------------------- /** * Compares this mutable to another in ascending order. - * + * * @param other the other mutable to compare to, not null * @return negative if this is less, zero if equal, positive if greater */ @@ -262,7 +262,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta //----------------------------------------------------------------------- /** * Returns the String value of this mutable. - * + * * @return the mutable value as a string */ @Override diff --git a/src/org/apache/commons/lang3/mutable/MutableObject.java b/src/org/apache/commons/lang3/mutable/MutableObject.java index d0deb27..14e282b 100644 --- a/src/org/apache/commons/lang3/mutable/MutableObject.java +++ b/src/org/apache/commons/lang3/mutable/MutableObject.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,7 +21,7 @@ import java.io.Serializable; /** * A mutable <code>Object</code> wrapper. - * + * * @since 2.1 * @version $Id: MutableObject.java 1088899 2011-04-05 05:31:27Z bayard $ */ @@ -29,7 +29,7 @@ public class MutableObject<T> implements Mutable<T>, Serializable { /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = 86241875189L; @@ -46,7 +46,7 @@ public class MutableObject<T> implements Mutable<T>, Serializable { /** * Constructs a new MutableObject with the specified value. - * + * * @param value the initial value to store */ public MutableObject(T value) { @@ -57,7 +57,7 @@ public class MutableObject<T> implements Mutable<T>, Serializable { //----------------------------------------------------------------------- /** * Gets the value. - * + * * @return the value, may be null */ public T getValue() { @@ -66,7 +66,7 @@ public class MutableObject<T> implements Mutable<T>, Serializable { /** * Sets the value. - * + * * @param value the value to set */ public void setValue(T value) { @@ -80,7 +80,7 @@ public class MutableObject<T> implements Mutable<T>, Serializable { * is not <code>null</code> and is a <code>MutableObject</code> object that contains the same <code>T</code> * value as this object. * </p> - * + * * @param obj the object to compare with, <code>null</code> returns <code>false</code> * @return <code>true</code> if the objects are the same; * <code>true</code> if the objects have equivalent <code>value</code> fields; @@ -104,7 +104,7 @@ public class MutableObject<T> implements Mutable<T>, Serializable { /** * Returns the value's hash code or <code>0</code> if the value is <code>null</code>. - * + * * @return the value's hash code or <code>0</code> if the value is <code>null</code>. */ @Override @@ -115,7 +115,7 @@ public class MutableObject<T> implements Mutable<T>, Serializable { //----------------------------------------------------------------------- /** * Returns the String value of this mutable. - * + * * @return the mutable value as a string */ @Override diff --git a/src/org/apache/commons/lang3/mutable/MutableShort.java b/src/org/apache/commons/lang3/mutable/MutableShort.java index 33ca923..55f52f3 100644 --- a/src/org/apache/commons/lang3/mutable/MutableShort.java +++ b/src/org/apache/commons/lang3/mutable/MutableShort.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,8 +19,8 @@ package org.apache.commons.lang3.mutable; /** * A mutable <code>short</code> wrapper. * <p> - * Note that as MutableShort does not extend Short, it is not treated by String.format as a Short parameter. - * + * Note that as MutableShort does not extend Short, it is not treated by String.format as a Short parameter. + * * @see Short * @since 2.1 * @version $Id: MutableShort.java 1160571 2011-08-23 07:36:08Z bayard $ @@ -29,7 +29,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = -2135791679L; @@ -46,7 +46,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu /** * Constructs a new MutableShort with the specified value. - * + * * @param value the initial value to store */ public MutableShort(short value) { @@ -56,7 +56,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu /** * Constructs a new MutableShort with the specified value. - * + * * @param value the initial value to store, not null * @throws NullPointerException if the object is null */ @@ -67,7 +67,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu /** * Constructs a new MutableShort parsing the given string. - * + * * @param value the string to parse, not null * @throws NumberFormatException if the string cannot be parsed into a short * @since 2.5 @@ -80,7 +80,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu //----------------------------------------------------------------------- /** * Gets the value as a Short instance. - * + * * @return the value as a Short, never null */ public Short getValue() { @@ -89,7 +89,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu /** * Sets the value. - * + * * @param value the value to set */ public void setValue(short value) { @@ -98,7 +98,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu /** * Sets the value from any Number instance. - * + * * @param value the value to set, not null * @throws NullPointerException if the object is null */ @@ -128,7 +128,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu //----------------------------------------------------------------------- /** * Adds a value to the value of this instance. - * + * * @param operand the value to add, not null * @since Commons Lang 2.2 */ @@ -138,7 +138,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu /** * Adds a value to the value of this instance. - * + * * @param operand the value to add, not null * @throws NullPointerException if the object is null * @since Commons Lang 2.2 @@ -149,7 +149,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu /** * Subtracts a value from the value of this instance. - * + * * @param operand the value to subtract, not null * @since Commons Lang 2.2 */ @@ -159,7 +159,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu /** * Subtracts a value from the value of this instance. - * + * * @param operand the value to subtract, not null * @throws NullPointerException if the object is null * @since Commons Lang 2.2 @@ -235,7 +235,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu * Compares this object to the specified object. The result is <code>true</code> if and only if the argument * is not <code>null</code> and is a <code>MutableShort</code> object that contains the same <code>short</code> * value as this object. - * + * * @param obj the object to compare with, null returns false * @return <code>true</code> if the objects are the same; <code>false</code> otherwise. */ @@ -249,7 +249,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu /** * Returns a suitable hash code for this mutable. - * + * * @return a suitable hash code */ @Override @@ -260,7 +260,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu //----------------------------------------------------------------------- /** * Compares this mutable to another in ascending order. - * + * * @param other the other mutable to compare to, not null * @return negative if this is less, zero if equal, positive if greater */ @@ -272,7 +272,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu //----------------------------------------------------------------------- /** * Returns the String value of this mutable. - * + * * @return the mutable value as a string */ @Override diff --git a/src/org/apache/commons/lang3/tuple/ImmutablePair.java b/src/org/apache/commons/lang3/tuple/ImmutablePair.java index 61eee5b..a7bdd3e 100644 --- a/src/org/apache/commons/lang3/tuple/ImmutablePair.java +++ b/src/org/apache/commons/lang3/tuple/ImmutablePair.java @@ -18,12 +18,12 @@ package org.apache.commons.lang3.tuple; /** * <p>An immutable pair consisting of two {@code Object} elements.</p> - * + * * <p>Although the implementation is immutable, there is no restriction on the objects * that may be stored. If mutable objects are stored in the pair, then the pair * itself effectively becomes mutable. The class is also not {@code final}, so a subclass * could add undesirable behaviour.</p> - * + * * <p>#ThreadSafe# if the objects are threadsafe</p> * * @param <L> the left element type @@ -44,10 +44,10 @@ public final class ImmutablePair<L, R> extends Pair<L, R> { /** * <p>Obtains an immutable pair of from two objects inferring the generic types.</p> - * + * * <p>This factory allows the pair to be created using inference to * obtain the generic types.</p> - * + * * @param <L> the left element type * @param <R> the right element type * @param left the left element, may be null @@ -89,7 +89,7 @@ public final class ImmutablePair<L, R> extends Pair<L, R> { /** * <p>Throws {@code UnsupportedOperationException}.</p> - * + * * <p>This pair is immutable, so this operation is not supported.</p> * * @param value the value to set diff --git a/src/org/apache/commons/lang3/tuple/MutablePair.java b/src/org/apache/commons/lang3/tuple/MutablePair.java index df5c53f..d35d452 100644 --- a/src/org/apache/commons/lang3/tuple/MutablePair.java +++ b/src/org/apache/commons/lang3/tuple/MutablePair.java @@ -18,7 +18,7 @@ package org.apache.commons.lang3.tuple; /** * <p>A mutable pair consisting of two {@code Object} elements.</p> - * + * * <p>Not #ThreadSafe#</p> * * @param <L> the left element type @@ -39,10 +39,10 @@ public class MutablePair<L, R> extends Pair<L, R> { /** * <p>Obtains an immutable pair of from two objects inferring the generic types.</p> - * + * * <p>This factory allows the pair to be created using inference to * obtain the generic types.</p> - * + * * @param <L> the left element type * @param <R> the right element type * @param left the left element, may be null @@ -83,7 +83,7 @@ public class MutablePair<L, R> extends Pair<L, R> { /** * Sets the left element of the pair. - * + * * @param left the new value of the left element, may be null */ public void setLeft(L left) { @@ -100,7 +100,7 @@ public class MutablePair<L, R> extends Pair<L, R> { /** * Sets the right element of the pair. - * + * * @param right the new value of the right element, may be null */ public void setRight(R right) { @@ -110,7 +110,7 @@ public class MutablePair<L, R> extends Pair<L, R> { /** * Sets the {@code Map.Entry} value. * This sets the right element of the pair. - * + * * @param value the right value to set, not null * @return the old value for the right element */ diff --git a/src/org/apache/commons/lang3/tuple/Pair.java b/src/org/apache/commons/lang3/tuple/Pair.java index dc9a045..e47e204 100644 --- a/src/org/apache/commons/lang3/tuple/Pair.java +++ b/src/org/apache/commons/lang3/tuple/Pair.java @@ -24,11 +24,11 @@ import org.apache.commons.lang3.builder.CompareToBuilder; /** * <p>A pair consisting of two elements.</p> - * + * * <p>This class is an abstract implementation defining the basic API. * It refers to the elements as 'left' and 'right'. It also implements the * {@code Map.Entry} interface where the key is 'left' and the value is 'right'.</p> - * + * * <p>Subclass implementations may be mutable or immutable. * However, there is no restriction on the type of the stored objects that may be stored. * If mutable objects are stored in the pair, then the pair itself effectively becomes mutable.</p> @@ -46,10 +46,10 @@ public abstract class Pair<L, R> implements Map.Entry<L, R>, Comparable<Pair<L, /** * <p>Obtains an immutable pair of from two objects inferring the generic types.</p> - * + * * <p>This factory allows the pair to be created using inference to * obtain the generic types.</p> - * + * * @param <L> the left element type * @param <R> the right element type * @param left the left element, may be null @@ -63,28 +63,28 @@ public abstract class Pair<L, R> implements Map.Entry<L, R>, Comparable<Pair<L, //----------------------------------------------------------------------- /** * <p>Gets the left element from this pair.</p> - * + * * <p>When treated as a key-value pair, this is the key.</p> - * + * * @return the left element, may be null */ public abstract L getLeft(); /** * <p>Gets the right element from this pair.</p> - * + * * <p>When treated as a key-value pair, this is the value.</p> - * + * * @return the right element, may be null */ public abstract R getRight(); /** * <p>Gets the key from this pair.</p> - * + * * <p>This method implements the {@code Map.Entry} interface returning the * left element as the key.</p> - * + * * @return the left element as the key, may be null */ public final L getKey() { @@ -93,10 +93,10 @@ public abstract class Pair<L, R> implements Map.Entry<L, R>, Comparable<Pair<L, /** * <p>Gets the value from this pair.</p> - * + * * <p>This method implements the {@code Map.Entry} interface returning the * right element as the value.</p> - * + * * @return the right element as the value, may be null */ public R getValue() { @@ -107,7 +107,7 @@ public abstract class Pair<L, R> implements Map.Entry<L, R>, Comparable<Pair<L, /** * <p>Compares the pair based on the left element followed by the right element. * The types must be {@code Comparable}.</p> - * + * * @param other the other pair, not null * @return negative if this is less, zero if equal, positive if greater */ @@ -118,7 +118,7 @@ public abstract class Pair<L, R> implements Map.Entry<L, R>, Comparable<Pair<L, /** * <p>Compares this pair to another based on the two elements.</p> - * + * * @param obj the object to compare to, null returns false * @return true if the elements of the pair are equal */ @@ -138,7 +138,7 @@ public abstract class Pair<L, R> implements Map.Entry<L, R>, Comparable<Pair<L, /** * <p>Returns a suitable hash code. * The hash code follows the definition in {@code Map.Entry}.</p> - * + * * @return the hash code */ @Override @@ -150,7 +150,7 @@ public abstract class Pair<L, R> implements Map.Entry<L, R>, Comparable<Pair<L, /** * <p>Returns a String representation of this pair using the format {@code ($left,$right)}.</p> - * + * * @return a string describing this object, not null */ @Override @@ -160,12 +160,12 @@ public abstract class Pair<L, R> implements Map.Entry<L, R>, Comparable<Pair<L, /** * <p>Formats the receiver using the given format.</p> - * + * * <p>This uses {@link java.util.Formattable} to perform the formatting. Two variables may * be used to embed the left and right elements. Use {@code %1$s} for the left * element (key) and {@code %2$s} for the right element (value). * The default format used by {@code toString()} is {@code (%1$s,%2$s)}.</p> - * + * * @param format the format string, optionally containing {@code %1$s} and {@code %2$s}, not null * @return the formatted string, not null */ |
