http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/math/NumberUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/math/NumberUtils.java b/src/main/java/org/apache/commons/lang3/math/NumberUtils.java index 0d512fe..1175f5d 100644 --- a/src/main/java/org/apache/commons/lang3/math/NumberUtils.java +++ b/src/main/java/org/apache/commons/lang3/math/NumberUtils.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. @@ -30,7 +30,7 @@ import org.apache.commons.lang3.Validate; * @since 2.0 */ public class NumberUtils { - + /** Reusable Long constant for zero. */ public static final Long LONG_ZERO = Long.valueOf(0L); /** Reusable Long constant for one. */ @@ -222,7 +222,7 @@ public class NumberUtils { public static float toFloat(final String str, final float defaultValue) { if (str == null) { return defaultValue; - } + } try { return Float.parseFloat(str); } catch (final NumberFormatException nfe) { @@ -425,7 +425,7 @@ public class NumberUtils { * prefix is more than 8 - or BigInteger if there are more than 16 digits. * </p> * <p>Then, the value is examined for a type qualifier on the end, i.e. one of - * <code>'f','F','d','D','l','L'</code>. If it is found, it starts + * <code>'f','F','d','D','l','L'</code>. If it is found, it starts * trying to create successively larger types from the type specified * until one is found that can represent the value.</p> * @@ -433,7 +433,7 @@ public class NumberUtils { * and then try successively larger types from <code>Integer</code> to * <code>BigInteger</code> and from <code>Float</code> to * <code>BigDecimal</code>.</p> - * + * * <p> * Integral values with a leading {@code 0} will be interpreted as octal; the returned number will * be Integer, Long or BigDecimal as appropriate. @@ -621,7 +621,7 @@ public class NumberUtils { * <p>Utility method for {@link #createNumber(java.lang.String)}.</p> * * <p>Returns mantissa of the given number.</p> - * + * * @param str the string representation of the number * @return mantissa of the given number */ @@ -633,7 +633,7 @@ public class NumberUtils { * <p>Utility method for {@link #createNumber(java.lang.String)}.</p> * * <p>Returns mantissa of the given number.</p> - * + * * @param str the string representation of the number * @param stopPos the position of the exponent or decimal point * @return mantissa of the given number @@ -649,7 +649,7 @@ public class NumberUtils { * <p>Utility method for {@link #createNumber(java.lang.String)}.</p> * * <p>Returns <code>true</code> if s is <code>null</code>.</p> - * + * * @param str the String to check * @return if it is all zeros or <code>null</code> */ @@ -670,7 +670,7 @@ public class NumberUtils { * <p>Convert a <code>String</code> to a <code>Float</code>.</p> * * <p>Returns <code>null</code> if the string is <code>null</code>.</p> - * + * * @param str a <code>String</code> to convert, may be null * @return converted <code>Float</code> (or null if the input is null) * @throws NumberFormatException if the value cannot be converted @@ -684,7 +684,7 @@ public class NumberUtils { /** * <p>Convert a <code>String</code> to a <code>Double</code>.</p> - * + * * <p>Returns <code>null</code> if the string is <code>null</code>.</p> * * @param str a <code>String</code> to convert, may be null @@ -704,7 +704,7 @@ public class NumberUtils { * N.B. a leading zero means octal; spaces are not trimmed.</p> * * <p>Returns <code>null</code> if the string is <code>null</code>.</p> - * + * * @param str a <code>String</code> to convert, may be null * @return converted <code>Integer</code> (or null if the input is null) * @throws NumberFormatException if the value cannot be converted @@ -718,10 +718,10 @@ public class NumberUtils { } /** - * <p>Convert a <code>String</code> to a <code>Long</code>; + * <p>Convert a <code>String</code> to a <code>Long</code>; * since 3.1 it handles hex (0Xhhhh) and octal (0ddd) notations. * N.B. a leading zero means octal; spaces are not trimmed.</p> - * + * * <p>Returns <code>null</code> if the string is <code>null</code>.</p> * * @param str a <code>String</code> to convert, may be null @@ -740,7 +740,7 @@ public class NumberUtils { * since 3.2 it handles hex (0x or #) and octal (0) notations.</p> * * <p>Returns <code>null</code> if the string is <code>null</code>.</p> - * + * * @param str a <code>String</code> to convert, may be null * @return converted <code>BigInteger</code> (or null if the input is null) * @throws NumberFormatException if the value cannot be converted @@ -773,7 +773,7 @@ public class NumberUtils { /** * <p>Convert a <code>String</code> to a <code>BigDecimal</code>.</p> - * + * * <p>Returns <code>null</code> if the string is <code>null</code>.</p> * * @param str a <code>String</code> to convert, may be null @@ -790,8 +790,8 @@ public class NumberUtils { } if (str.trim().startsWith("--")) { // this is protection for poorness in java.lang.BigDecimal. - // it accepts this as a legal value, but it does not appear - // to be in specification of class. OS X Java parses it to + // it accepts this as a legal value, but it does not appear + // to be in specification of class. OS X Java parses it to // a wrong value. throw new NumberFormatException(str + " is not a valid number."); } @@ -802,7 +802,7 @@ public class NumberUtils { //-------------------------------------------------------------------- /** * <p>Returns the minimum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the minimum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -812,7 +812,7 @@ public class NumberUtils { public static long min(final long... array) { // Validates input validateArray(array); - + // Finds and returns min long min = array[0]; for (int i = 1; i < array.length; i++) { @@ -820,13 +820,13 @@ public class NumberUtils { min = array[i]; } } - + return min; } /** * <p>Returns the minimum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the minimum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -836,7 +836,7 @@ public class NumberUtils { public static int min(final int... array) { // Validates input validateArray(array); - + // Finds and returns min int min = array[0]; for (int j = 1; j < array.length; j++) { @@ -844,13 +844,13 @@ public class NumberUtils { min = array[j]; } } - + return min; } /** * <p>Returns the minimum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the minimum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -860,7 +860,7 @@ public class NumberUtils { public static short min(final short... array) { // Validates input validateArray(array); - + // Finds and returns min short min = array[0]; for (int i = 1; i < array.length; i++) { @@ -868,13 +868,13 @@ public class NumberUtils { min = array[i]; } } - + return min; } /** * <p>Returns the minimum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the minimum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -884,7 +884,7 @@ public class NumberUtils { public static byte min(final byte... array) { // Validates input validateArray(array); - + // Finds and returns min byte min = array[0]; for (int i = 1; i < array.length; i++) { @@ -892,13 +892,13 @@ public class NumberUtils { min = array[i]; } } - + return min; } /** * <p>Returns the minimum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the minimum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -909,7 +909,7 @@ public class NumberUtils { public static double min(final double... array) { // Validates input validateArray(array); - + // Finds and returns min double min = array[0]; for (int i = 1; i < array.length; i++) { @@ -920,13 +920,13 @@ public class NumberUtils { min = array[i]; } } - + return min; } /** * <p>Returns the minimum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the minimum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -937,7 +937,7 @@ public class NumberUtils { public static float min(final float... array) { // Validates input validateArray(array); - + // Finds and returns min float min = array[0]; for (int i = 1; i < array.length; i++) { @@ -948,7 +948,7 @@ public class NumberUtils { min = array[i]; } } - + return min; } @@ -956,7 +956,7 @@ public class NumberUtils { //-------------------------------------------------------------------- /** * <p>Returns the maximum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the maximum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -980,7 +980,7 @@ public class NumberUtils { /** * <p>Returns the maximum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the maximum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -990,7 +990,7 @@ public class NumberUtils { public static int max(final int... array) { // Validates input validateArray(array); - + // Finds and returns max int max = array[0]; for (int j = 1; j < array.length; j++) { @@ -998,13 +998,13 @@ public class NumberUtils { max = array[j]; } } - + return max; } /** * <p>Returns the maximum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the maximum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -1014,7 +1014,7 @@ public class NumberUtils { public static short max(final short... array) { // Validates input validateArray(array); - + // Finds and returns max short max = array[0]; for (int i = 1; i < array.length; i++) { @@ -1022,13 +1022,13 @@ public class NumberUtils { max = array[i]; } } - + return max; } /** * <p>Returns the maximum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the maximum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -1038,7 +1038,7 @@ public class NumberUtils { public static byte max(final byte... array) { // Validates input validateArray(array); - + // Finds and returns max byte max = array[0]; for (int i = 1; i < array.length; i++) { @@ -1046,13 +1046,13 @@ public class NumberUtils { max = array[i]; } } - + return max; } /** * <p>Returns the maximum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the maximum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -1074,13 +1074,13 @@ public class NumberUtils { max = array[j]; } } - + return max; } /** * <p>Returns the maximum value in an array.</p> - * + * * @param array an array, must not be null or empty * @return the maximum value in the array * @throws IllegalArgumentException if <code>array</code> is <code>null</code> @@ -1114,14 +1114,14 @@ public class NumberUtils { */ private static void validateArray(final Object array) { Validate.isTrue(array != null, "The Array must not be null"); - Validate.isTrue(Array.getLength(array) != 0, "Array cannot be empty."); + Validate.isTrue(Array.getLength(array) != 0, "Array cannot be empty."); } - + // 3 param min //----------------------------------------------------------------------- /** * <p>Gets the minimum of three <code>long</code> values.</p> - * + * * @param a value 1 * @param b value 2 * @param c value 3 @@ -1139,7 +1139,7 @@ public class NumberUtils { /** * <p>Gets the minimum of three <code>int</code> values.</p> - * + * * @param a value 1 * @param b value 2 * @param c value 3 @@ -1157,7 +1157,7 @@ public class NumberUtils { /** * <p>Gets the minimum of three <code>short</code> values.</p> - * + * * @param a value 1 * @param b value 2 * @param c value 3 @@ -1175,7 +1175,7 @@ public class NumberUtils { /** * <p>Gets the minimum of three <code>byte</code> values.</p> - * + * * @param a value 1 * @param b value 2 * @param c value 3 @@ -1193,10 +1193,10 @@ public class NumberUtils { /** * <p>Gets the minimum of three <code>double</code> values.</p> - * + * * <p>If any value is <code>NaN</code>, <code>NaN</code> is * returned. Infinity is handled.</p> - * + * * @param a value 1 * @param b value 2 * @param c value 3 @@ -1209,7 +1209,7 @@ public class NumberUtils { /** * <p>Gets the minimum of three <code>float</code> values.</p> - * + * * <p>If any value is <code>NaN</code>, <code>NaN</code> is * returned. Infinity is handled.</p> * @@ -1227,7 +1227,7 @@ public class NumberUtils { //----------------------------------------------------------------------- /** * <p>Gets the maximum of three <code>long</code> values.</p> - * + * * @param a value 1 * @param b value 2 * @param c value 3 @@ -1245,7 +1245,7 @@ public class NumberUtils { /** * <p>Gets the maximum of three <code>int</code> values.</p> - * + * * @param a value 1 * @param b value 2 * @param c value 3 @@ -1263,7 +1263,7 @@ public class NumberUtils { /** * <p>Gets the maximum of three <code>short</code> values.</p> - * + * * @param a value 1 * @param b value 2 * @param c value 3 @@ -1281,7 +1281,7 @@ public class NumberUtils { /** * <p>Gets the maximum of three <code>byte</code> values.</p> - * + * * @param a value 1 * @param b value 2 * @param c value 3 @@ -1299,7 +1299,7 @@ public class NumberUtils { /** * <p>Gets the maximum of three <code>double</code> values.</p> - * + * * <p>If any value is <code>NaN</code>, <code>NaN</code> is * returned. Infinity is handled.</p> * @@ -1315,7 +1315,7 @@ public class NumberUtils { /** * <p>Gets the maximum of three <code>float</code> values.</p> - * + * * <p>If any value is <code>NaN</code>, <code>NaN</code> is * returned. Infinity is handled.</p> * @@ -1432,7 +1432,7 @@ public class NumberUtils { return false; } } - return true; + return true; } } sz--; // don't want to loop to the last char, check it afterwords @@ -1447,7 +1447,7 @@ public class NumberUtils { } else if (chars[i] == '.') { if (hasDecPoint || hasExp) { - // two decimal points or dec in exponent + // two decimal points or dec in exponent return false; } hasDecPoint = true; @@ -1512,7 +1512,7 @@ public class NumberUtils { // found digit it to make sure weird stuff like '.' and '1E-' doesn't pass return !allowSigns && foundDigit; } - + /** * <p>Checks whether the given String is a parsable number.</p> *
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/mutable/Mutable.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/mutable/Mutable.java b/src/main/java/org/apache/commons/lang3/mutable/Mutable.java index 301cac2..85f2bdc 100644 --- a/src/main/java/org/apache/commons/lang3/mutable/Mutable.java +++ b/src/main/java/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,22 +25,22 @@ 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. - * - * @param <T> the type to set and get + * + * @param <T> the type to set and get * @since 2.1 */ 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 http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/mutable/MutableBoolean.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableBoolean.java b/src/main/java/org/apache/commons/lang3/mutable/MutableBoolean.java index 97781bf..1aec693 100644 --- a/src/main/java/org/apache/commons/lang3/mutable/MutableBoolean.java +++ b/src/main/java/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. @@ -24,8 +24,8 @@ import org.apache.commons.lang3.BooleanUtils; /** * 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 */ @@ -33,7 +33,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = -4830728138360036487L; @@ -50,7 +50,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(final boolean value) { @@ -60,7 +60,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 */ @@ -72,7 +72,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl //----------------------------------------------------------------------- /** * Gets the value as a Boolean instance. - * + * * @return the value as a Boolean, never null */ @Override @@ -82,7 +82,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl /** * Sets the value. - * + * * @param value the value to set */ public void setValue(final boolean value) { @@ -91,7 +91,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl /** * Sets the value to false. - * + * * @since 3.3 */ public void setFalse() { @@ -100,7 +100,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl /** * Sets the value to true. - * + * * @since 3.3 */ public void setTrue() { @@ -109,7 +109,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 */ @@ -121,7 +121,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 */ @@ -131,7 +131,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 */ @@ -142,7 +142,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() { @@ -165,7 +165,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. */ @@ -179,7 +179,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 @@ -190,7 +190,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 @@ -203,7 +203,7 @@ public class MutableBoolean implements Mutable<Boolean>, Serializable, Comparabl //----------------------------------------------------------------------- /** * Returns the String value of this mutable. - * + * * @return the mutable value as a string */ @Override http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/mutable/MutableByte.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableByte.java b/src/main/java/org/apache/commons/lang3/mutable/MutableByte.java index 5ceb9bb..0d07749 100644 --- a/src/main/java/org/apache/commons/lang3/mutable/MutableByte.java +++ b/src/main/java/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. @@ -21,8 +21,8 @@ import org.apache.commons.lang3.math.NumberUtils; /** * 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 */ @@ -30,7 +30,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = -1585823265L; @@ -47,7 +47,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(final byte value) { @@ -57,7 +57,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 */ @@ -68,7 +68,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 @@ -81,7 +81,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 */ @Override @@ -91,7 +91,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta /** * Sets the value. - * + * * @param value the value to set */ public void setValue(final byte value) { @@ -100,7 +100,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 */ @@ -181,7 +181,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 */ @@ -191,7 +191,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 @@ -202,7 +202,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 */ @@ -212,7 +212,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 @@ -344,7 +344,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. */ @@ -358,7 +358,7 @@ public class MutableByte extends Number implements Comparable<MutableByte>, Muta /** * Returns a suitable hash code for this mutable. - * + * * @return a suitable hash code */ @Override @@ -369,7 +369,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 */ @@ -381,7 +381,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 http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java b/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java index cd89027..dd0ac0e 100644 --- a/src/main/java/org/apache/commons/lang3/mutable/MutableDouble.java +++ b/src/main/java/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 */ @@ -28,7 +28,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = 1587163916L; @@ -45,7 +45,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(final double value) { @@ -55,7 +55,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 */ @@ -66,7 +66,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 @@ -79,7 +79,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, //----------------------------------------------------------------------- /** * Gets the value as a Double instance. - * + * * @return the value as a Double, never null */ @Override @@ -89,7 +89,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Sets the value. - * + * * @param value the value to set */ public void setValue(final 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 */ @@ -110,7 +110,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() { @@ -119,7 +119,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Checks whether the double value is infinite. - * + * * @return true if infinite */ public boolean isInfinite() { @@ -198,7 +198,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 */ @@ -208,7 +208,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 @@ -219,7 +219,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 */ @@ -229,7 +229,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 @@ -356,11 +356,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: @@ -372,7 +372,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. */ @@ -384,7 +384,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, /** * Returns a suitable hash code for this mutable. - * + * * @return a suitable hash code */ @Override @@ -396,7 +396,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 */ @@ -408,7 +408,7 @@ public class MutableDouble extends Number implements Comparable<MutableDouble>, //----------------------------------------------------------------------- /** * Returns the String value of this mutable. - * + * * @return the mutable value as a string */ @Override http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java b/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java index 6ed0980..eec7cf1 100644 --- a/src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java +++ b/src/main/java/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 */ @@ -28,7 +28,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = 5787169186L; @@ -45,7 +45,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(final float value) { @@ -55,7 +55,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 */ @@ -66,7 +66,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 @@ -79,7 +79,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 */ @Override @@ -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(final 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 */ @@ -110,7 +110,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() { @@ -119,7 +119,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Checks whether the float value is infinite. - * + * * @return true if infinite */ public boolean isInfinite() { @@ -198,7 +198,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 */ @@ -208,7 +208,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 @@ -219,7 +219,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 */ @@ -229,7 +229,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 @@ -356,11 +356,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: @@ -373,7 +373,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) @@ -386,7 +386,7 @@ public class MutableFloat extends Number implements Comparable<MutableFloat>, Mu /** * Returns a suitable hash code for this mutable. - * + * * @return a suitable hash code */ @Override @@ -397,7 +397,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 */ @@ -409,7 +409,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 http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/mutable/MutableInt.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableInt.java b/src/main/java/org/apache/commons/lang3/mutable/MutableInt.java index 7311f00..6e022bd 100644 --- a/src/main/java/org/apache/commons/lang3/mutable/MutableInt.java +++ b/src/main/java/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. @@ -21,8 +21,8 @@ import org.apache.commons.lang3.math.NumberUtils; /** * 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 */ @@ -30,7 +30,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = 512176391864L; @@ -47,7 +47,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(final int value) { @@ -57,7 +57,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 */ @@ -68,7 +68,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 @@ -81,7 +81,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 */ @Override @@ -91,7 +91,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl /** * Sets the value. - * + * * @param value the value to set */ public void setValue(final int value) { @@ -100,7 +100,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 */ @@ -181,7 +181,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 */ @@ -191,7 +191,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 @@ -202,7 +202,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 */ @@ -212,7 +212,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 @@ -334,7 +334,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. */ @@ -348,7 +348,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl /** * Returns a suitable hash code for this mutable. - * + * * @return a suitable hash code */ @Override @@ -359,7 +359,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 */ @@ -371,7 +371,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 http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/mutable/MutableLong.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableLong.java b/src/main/java/org/apache/commons/lang3/mutable/MutableLong.java index 5b6254a..dbd32d5 100644 --- a/src/main/java/org/apache/commons/lang3/mutable/MutableLong.java +++ b/src/main/java/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. @@ -21,8 +21,8 @@ import org.apache.commons.lang3.math.NumberUtils; /** * 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 */ @@ -30,7 +30,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = 62986528375L; @@ -47,7 +47,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(final long value) { @@ -57,7 +57,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 */ @@ -68,7 +68,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 @@ -81,7 +81,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 */ @Override @@ -91,7 +91,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta /** * Sets the value. - * + * * @param value the value to set */ public void setValue(final long value) { @@ -100,7 +100,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 */ @@ -181,7 +181,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 */ @@ -191,7 +191,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 @@ -202,7 +202,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 */ @@ -212,7 +212,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 @@ -334,7 +334,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. */ @@ -348,7 +348,7 @@ public class MutableLong extends Number implements Comparable<MutableLong>, Muta /** * Returns a suitable hash code for this mutable. - * + * * @return a suitable hash code */ @Override @@ -359,7 +359,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 */ @@ -371,7 +371,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 http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/mutable/MutableObject.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableObject.java b/src/main/java/org/apache/commons/lang3/mutable/MutableObject.java index 180cf3a..3c78bc1 100644 --- a/src/main/java/org/apache/commons/lang3/mutable/MutableObject.java +++ b/src/main/java/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,15 +21,15 @@ import java.io.Serializable; /** * A mutable <code>Object</code> wrapper. - * - * @param <T> the type to set and get + * + * @param <T> the type to set and get * @since 2.1 */ 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(final T value) { @@ -57,7 +57,7 @@ public class MutableObject<T> implements Mutable<T>, Serializable { //----------------------------------------------------------------------- /** * Gets the value. - * + * * @return the value, may be null */ @Override @@ -67,7 +67,7 @@ public class MutableObject<T> implements Mutable<T>, Serializable { /** * Sets the value. - * + * * @param value the value to set */ @Override @@ -82,7 +82,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; @@ -105,7 +105,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 @@ -116,7 +116,7 @@ public class MutableObject<T> implements Mutable<T>, Serializable { //----------------------------------------------------------------------- /** * Returns the String value of this mutable. - * + * * @return the mutable value as a string */ @Override http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/mutable/MutableShort.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableShort.java b/src/main/java/org/apache/commons/lang3/mutable/MutableShort.java index 01d604f..1cbd847 100644 --- a/src/main/java/org/apache/commons/lang3/mutable/MutableShort.java +++ b/src/main/java/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. @@ -21,8 +21,8 @@ import org.apache.commons.lang3.math.NumberUtils; /** * 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 */ @@ -30,7 +30,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu /** * Required for serialization support. - * + * * @see java.io.Serializable */ private static final long serialVersionUID = -2135791679L; @@ -47,7 +47,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(final short value) { @@ -57,7 +57,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 */ @@ -68,7 +68,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 @@ -81,7 +81,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 */ @Override @@ -91,7 +91,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu /** * Sets the value. - * + * * @param value the value to set */ public void setValue(final short value) { @@ -100,7 +100,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 */ @@ -181,7 +181,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 */ @@ -191,7 +191,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 @@ -202,7 +202,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 */ @@ -212,7 +212,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 @@ -344,7 +344,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. */ @@ -358,7 +358,7 @@ public class MutableShort extends Number implements Comparable<MutableShort>, Mu /** * Returns a suitable hash code for this mutable. - * + * * @return a suitable hash code */ @Override @@ -369,7 +369,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 */ @@ -381,7 +381,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 http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java b/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java index 0808fc7..b6fb70d 100644 --- a/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java +++ b/src/main/java/org/apache/commons/lang3/reflect/ConstructorUtils.java @@ -60,7 +60,7 @@ public class ConstructorUtils { /** * <p>Returns a new instance of the specified class inferring the right constructor * from the types of the arguments.</p> - * + * * <p>This locates and calls a constructor. * The constructor signature must match the argument types by assignment compatibility.</p> * @@ -87,7 +87,7 @@ public class ConstructorUtils { /** * <p>Returns a new instance of the specified class choosing the right constructor * from the list of parameter types.</p> - * + * * <p>This locates and calls a constructor. * The constructor signature must match the parameter types by assignment compatibility.</p> * @@ -184,7 +184,7 @@ public class ConstructorUtils { //----------------------------------------------------------------------- /** * <p>Finds a constructor given a class and signature, checking accessibility.</p> - * + * * <p>This finds the constructor and ensures that it is accessible. * The constructor signature must match the parameter types exactly.</p> * @@ -208,7 +208,7 @@ public class ConstructorUtils { /** * <p>Checks if the specified constructor is accessible.</p> - * + * * <p>This simply ensures that the constructor is accessible.</p> * * @param <T> the constructor type @@ -225,7 +225,7 @@ public class ConstructorUtils { /** * <p>Finds an accessible constructor with compatible parameters.</p> - * + * * <p>This checks all the constructor and finds one with compatible parameters * This requires that every parameter is assignable from the given parameter types. * This is a more flexible search than the normal exact matching algorithm.</p> http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java b/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java index 8b4ac30..aa2287a 100644 --- a/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java +++ b/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java @@ -32,7 +32,7 @@ import java.util.List; * <p> * The ability is provided to break the scoping restrictions coded by the programmer. This can allow fields to be * changed that shouldn't be. This facility should be used with care. - * + * * @since 2.5 */ public class FieldUtils { @@ -49,7 +49,7 @@ public class FieldUtils { /** * Gets an accessible {@link Field} by name respecting scope. Superclasses/interfaces will be considered. - * + * * @param cls * the {@link Class} to reflect, must not be {@code null} * @param fieldName @@ -67,7 +67,7 @@ public class FieldUtils { /** * Gets an accessible {@link Field} by name, breaking scope if requested. Superclasses/interfaces will be * considered. - * + * * @param cls * the {@link Class} to reflect, must not be {@code null} * @param fieldName @@ -135,7 +135,7 @@ public class FieldUtils { /** * Gets an accessible {@link Field} by name respecting scope. Only the specified class will be considered. - * + * * @param cls * the {@link Class} to reflect, must not be {@code null} * @param fieldName @@ -151,7 +151,7 @@ public class FieldUtils { /** * Gets an accessible {@link Field} by name, breaking scope if requested. Only the specified class will be * considered. - * + * * @param cls * the {@link Class} to reflect, must not be {@code null} * @param fieldName @@ -186,7 +186,7 @@ public class FieldUtils { /** * Gets all fields of the given class and its parents (if any). - * + * * @param cls * the {@link Class} to query * @return an array of Fields (possibly empty). @@ -201,7 +201,7 @@ public class FieldUtils { /** * Gets all fields of the given class and its parents (if any). - * + * * @param cls * the {@link Class} to query * @return an array of Fields (possibly empty). @@ -264,7 +264,7 @@ public class FieldUtils { /** * Reads an accessible {@code static} {@link Field}. - * + * * @param field * to read * @return the field value @@ -279,7 +279,7 @@ public class FieldUtils { /** * Reads a static {@link Field}. - * + * * @param field * to read * @param forceAccess @@ -299,7 +299,7 @@ public class FieldUtils { /** * Reads the named {@code public static} {@link Field}. Superclasses will be considered. - * + * * @param cls * the {@link Class} to reflect, must not be {@code null} * @param fieldName @@ -317,7 +317,7 @@ public class FieldUtils { /** * Reads the named {@code static} {@link Field}. Superclasses will be considered. - * + * * @param cls * the {@link Class} to reflect, must not be {@code null} * @param fieldName @@ -343,7 +343,7 @@ public class FieldUtils { /** * Gets the value of a {@code static} {@link Field} by name. The field must be {@code public}. Only the specified * class will be considered. - * + * * @param cls * the {@link Class} to reflect, must not be {@code null} * @param fieldName @@ -361,7 +361,7 @@ public class FieldUtils { /** * Gets the value of a {@code static} {@link Field} by name. Only the specified class will be considered. - * + * * @param cls * the {@link Class} to reflect, must not be {@code null} * @param fieldName @@ -386,7 +386,7 @@ public class FieldUtils { /** * Reads an accessible {@link Field}. - * + * * @param field * the field to use * @param target @@ -403,7 +403,7 @@ public class FieldUtils { /** * Reads a {@link Field}. - * + * * @param field * the field to use * @param target @@ -429,7 +429,7 @@ public class FieldUtils { /** * Reads the named {@code public} {@link Field}. Superclasses will be considered. - * + * * @param target * the object to reflect, must not be {@code null} * @param fieldName @@ -446,7 +446,7 @@ public class FieldUtils { /** * Reads the named {@link Field}. Superclasses will be considered. - * + * * @param target * the object to reflect, must not be {@code null} * @param fieldName @@ -472,7 +472,7 @@ public class FieldUtils { /** * Reads the named {@code public} {@link Field}. Only the class of the specified object will be considered. - * + * * @param target * the object to reflect, must not be {@code null} * @param fieldName @@ -489,7 +489,7 @@ public class FieldUtils { /** * Gets a {@link Field} value by name. Only the class of the specified object will be considered. - * + * * @param target * the object to reflect, must not be {@code null} * @param fieldName @@ -515,7 +515,7 @@ public class FieldUtils { /** * Writes a {@code public static} {@link Field}. - * + * * @param field * to write * @param value @@ -531,7 +531,7 @@ public class FieldUtils { /** * Writes a static {@link Field}. - * + * * @param field * to write * @param value @@ -554,7 +554,7 @@ public class FieldUtils { /** * Writes a named {@code public static} {@link Field}. Superclasses will be considered. - * + * * @param cls * {@link Class} on which the field is to be found * @param fieldName @@ -573,7 +573,7 @@ public class FieldUtils { /** * Writes a named {@code static} {@link Field}. Superclasses will be considered. - * + * * @param cls * {@link Class} on which the field is to be found * @param fieldName @@ -600,7 +600,7 @@ public class FieldUtils { /** * Writes a named {@code public static} {@link Field}. Only the specified class will be considered. - * + * * @param cls * {@link Class} on which the field is to be found * @param fieldName @@ -619,7 +619,7 @@ public class FieldUtils { /** * Writes a named {@code static} {@link Field}. Only the specified class will be considered. - * + * * @param cls * {@link Class} on which the field is to be found * @param fieldName @@ -645,7 +645,7 @@ public class FieldUtils { /** * Writes an accessible {@link Field}. - * + * * @param field * to write * @param target @@ -662,7 +662,7 @@ public class FieldUtils { /** * Writes a {@link Field}. - * + * * @param field * to write * @param target @@ -691,7 +691,7 @@ public class FieldUtils { /** * Removes the final modifier from a {@link Field}. - * + * * @param field * to remove the final modifier * @throws IllegalArgumentException @@ -704,7 +704,7 @@ public class FieldUtils { /** * Removes the final modifier from a {@link Field}. - * + * * @param field * to remove the final modifier * @param forceAccess @@ -743,7 +743,7 @@ public class FieldUtils { /** * Writes a {@code public} {@link Field}. Superclasses will be considered. - * + * * @param target * the object to reflect, must not be {@code null} * @param fieldName @@ -762,7 +762,7 @@ public class FieldUtils { /** * Writes a {@link Field}. Superclasses will be considered. - * + * * @param target * the object to reflect, must not be {@code null} * @param fieldName @@ -791,7 +791,7 @@ public class FieldUtils { /** * Writes a {@code public} {@link Field}. Only the specified class will be considered. - * + * * @param target * the object to reflect, must not be {@code null} * @param fieldName @@ -810,7 +810,7 @@ public class FieldUtils { /** * Writes a {@code public} {@link Field}. Only the specified class will be considered. - * + * * @param target * the object to reflect, must not be {@code null} * @param fieldName http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java index 2855410..17ed733 100644 --- a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java +++ b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java @@ -49,10 +49,10 @@ import org.apache.commons.lang3.Validate; * Reflection locates these methods fine and correctly assigns them as {@code public}. * However, an {@link IllegalAccessException} is thrown if the method is invoked.</p> * - * <p>{@link MethodUtils} contains a workaround for this situation. + * <p>{@link MethodUtils} contains a workaround for this situation. * It will attempt to call {@link java.lang.reflect.AccessibleObject#setAccessible(boolean)} on this method. * If this call succeeds, then the method can be invoked as normal. - * This call will only succeed when the application has sufficient security privileges. + * This call will only succeed when the application has sufficient security privileges. * If this call fails then the method may fail.</p> * * @since 2.5 @@ -87,14 +87,14 @@ public class MethodUtils { * @throws NoSuchMethodException if there is no such accessible method * @throws InvocationTargetException wraps an exception thrown by the method invoked * @throws IllegalAccessException if the requested method is not accessible via reflection - * + * * @since 3.4 */ public static Object invokeMethod(final Object object, final String methodName) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { return invokeMethod(object, methodName, ArrayUtils.EMPTY_OBJECT_ARRAY, null); } - + /** * <p>Invokes a named method without parameters.</p> * @@ -123,7 +123,7 @@ public class MethodUtils { * * <p>This method delegates the method search to {@link #getMatchingAccessibleMethod(Class, String, Class[])}.</p> * - * <p>This method supports calls to methods taking primitive parameters + * <p>This method supports calls to methods taking primitive parameters * via passing in wrapping classes. So, for example, a {@code Boolean} object * would match a {@code boolean} primitive.</p> * @@ -147,11 +147,11 @@ public class MethodUtils { final Class<?>[] parameterTypes = ClassUtils.toClass(args); return invokeMethod(object, methodName, args, parameterTypes); } - + /** * <p>Invokes a named method whose parameter type matches the object type.</p> * - * <p>This method supports calls to methods taking primitive parameters + * <p>This method supports calls to methods taking primitive parameters * via passing in wrapping classes. So, for example, a {@code Boolean} object * would match a {@code boolean} primitive.</p> * @@ -182,7 +182,7 @@ public class MethodUtils { /** * <p>Invokes a named method whose parameter type matches the object type.</p> * - * <p>This method supports calls to methods taking primitive parameters + * <p>This method supports calls to methods taking primitive parameters * via passing in wrapping classes. So, for example, a {@code Boolean} object * would match a {@code boolean} primitive.</p> * @@ -235,7 +235,7 @@ public class MethodUtils { * * <p>This method delegates the method search to {@link #getMatchingAccessibleMethod(Class, String, Class[])}.</p> * - * <p>This method supports calls to methods taking primitive parameters + * <p>This method supports calls to methods taking primitive parameters * via passing in wrapping classes. So, for example, a {@code Boolean} object * would match a {@code boolean} primitive.</p> * @@ -249,7 +249,7 @@ public class MethodUtils { * @throws InvocationTargetException wraps an exception thrown by the method invoked * @throws IllegalAccessException if the requested method is not accessible via reflection */ - public static Object invokeMethod(final Object object, final String methodName, + public static Object invokeMethod(final Object object, final String methodName, final Object[] args, final Class<?>[] parameterTypes) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { @@ -378,7 +378,7 @@ public class MethodUtils { * * <p>This method delegates the method search to {@link #getMatchingAccessibleMethod(Class, String, Class[])}.</p> * - * <p>This method supports calls to methods taking primitive parameters + * <p>This method supports calls to methods taking primitive parameters * via passing in wrapping classes. So, for example, a {@code Boolean} class * would match a {@code boolean} primitive.</p> * @@ -410,7 +410,7 @@ public class MethodUtils { * * <p>This method delegates the method search to {@link #getMatchingAccessibleMethod(Class, String, Class[])}.</p> * - * <p>This method supports calls to methods taking primitive parameters + * <p>This method supports calls to methods taking primitive parameters * via passing in wrapping classes. So, for example, a {@code Boolean} class * would match a {@code boolean} primitive.</p> * @@ -650,13 +650,13 @@ public class MethodUtils { /** * <p>Finds an accessible method that matches the given name and has compatible parameters. - * Compatible parameters mean that every method parameter is assignable from + * Compatible parameters mean that every method parameter is assignable from * the given parameters. - * In other words, it finds a method with the given name + * In other words, it finds a method with the given name * that will take the parameters given.</p> * - * <p>This method is used by - * {@link + * <p>This method is used by + * {@link * #invokeMethod(Object object, String methodName, Object[] args, Class[] parameterTypes)}. * </p> * @@ -667,7 +667,7 @@ public class MethodUtils { * * @param cls find method in this class * @param methodName find method with this name - * @param parameterTypes find method with most compatible parameters + * @param parameterTypes find method with most compatible parameters * @return The accessible method */ public static Method getMatchingAccessibleMethod(final Class<?> cls, @@ -714,7 +714,7 @@ public class MethodUtils { return bestMatch; } - + /** * <p>Retrieves a method whether or not it's accessible. If no such method * can be found, return {@code null}.</p> @@ -722,7 +722,7 @@ public class MethodUtils { * @param methodName The method that we wish to call * @param parameterTypes Argument class types * @return The method - * + * * @since 3.5 */ public static Method getMatchingMethod(final Class<?> cls, final String methodName, @@ -755,7 +755,7 @@ public class MethodUtils { } return inexactMatch; } - + /** * <p>Returns the aggregate number of inheritance hops between assignable argument class types. Returns -1 * if the arguments aren't assignable. Fills a specific purpose for getMatchingMethod and is not generalized.</p> http://git-wip-us.apache.org/repos/asf/commons-lang/blob/1da8ccdb/src/main/java/org/apache/commons/lang3/reflect/TypeLiteral.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/reflect/TypeLiteral.java b/src/main/java/org/apache/commons/lang3/reflect/TypeLiteral.java index bead33f..db801fc 100644 --- a/src/main/java/org/apache/commons/lang3/reflect/TypeLiteral.java +++ b/src/main/java/org/apache/commons/lang3/reflect/TypeLiteral.java @@ -106,7 +106,7 @@ public abstract class TypeLiteral<T> implements Typed<T> { return TypeUtils.equals(value, other.value); } - @Override + @Override public int hashCode() { return 37 << 4 | value.hashCode(); }