This commit is contained in:
Gary Gregory 2022-07-15 08:38:06 -04:00
commit d6ec3655b1
46 changed files with 244 additions and 243 deletions

View File

@ -88,6 +88,7 @@ The <action> type attribute can be add,update,fix,remove.
<action type="fix" dev="ggregory" due-to="Gary Gregory">Allow extension of previously final classes ImmutablePair and ImmutableTriple.</action>
<action type="fix" dev="ggregory" due-to="shalk, Bruno P. Kinoshita, Gary Gregory">Update ClassUtils Javadoc with some missing throws NPE #912.</action>
<action type="fix" dev="ggregory" due-to="guicaiyue">Javadoc: StringUtils.repeat("", "x", 3) = "xx"; #918.</action>
<action type="fix" dev="ggregory" due-to="Marc Wrobel">(doc) Fix typos in javadoc and comments #920.</action>
<!-- ADD -->
<action type="add" dev="ggregory" due-to="Gary Gregory">Add GitHub coverage.yml.</action>
<action type="add" dev="ggregory" due-to="Gary Gregory">Add EnumUtils.getEnumSystemProperty(...).</action>

View File

@ -1338,7 +1338,7 @@ public class ArrayUtils {
/**
* Copies the given array and adds the given element at the beginning of the new array.
* <p>
* The new array contains the same elements of the input array plus the given element in the first positioaddFirstaddFirstaddFirstn. The
* The new array contains the same elements of the input array plus the given element in the first position. The
* component type of the new array is the same as that of the input array.
* </p>
* <p>
@ -1770,7 +1770,7 @@ public class ArrayUtils {
}
/**
* Get a hash code for an array handling multi-dimensional arrays correctly.
* Get a hash code for an array handling multidimensional arrays correctly.
* <p>
* Multi-dimensional primitive arrays are also handled correctly by this method.
* </p>
@ -1790,7 +1790,7 @@ public class ArrayUtils {
*
* @param array the array to search through for the object, may be {@code null}
* @param valueToFind the value to find
* @return a BitSet of all the the indices of the value within the array,
* @return a BitSet of all the indices of the value within the array,
* an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
@ -3306,8 +3306,8 @@ public class ArrayUtils {
* Multi-dimensional primitive arrays are also handled correctly by this method.
* </p>
*
* @param array1 the left hand array to compare, may be {@code null}
* @param array2 the right hand array to compare, may be {@code null}
* @param array1 the left-hand array to compare, may be {@code null}
* @param array2 the right-hand array to compare, may be {@code null}
* @return {@code true} if the arrays are equal
* @deprecated this method has been replaced by {@code java.util.Objects.deepEquals(Object, Object)} and will be
* removed from future releases.
@ -3557,7 +3557,7 @@ public class ArrayUtils {
/**
* Checks whether two arrays are the same type taking into account
* multi-dimensional arrays.
* multidimensional arrays.
*
* @param array1 the first array, must not be {@code null}
* @param array2 the second array, must not be {@code null}
@ -5490,7 +5490,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified boolean array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5510,7 +5510,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified byte array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5530,7 +5530,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified char array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5550,7 +5550,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified double array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5570,7 +5570,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified float array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5590,7 +5590,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified int array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5610,7 +5610,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified long array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5630,7 +5630,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified short array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5650,7 +5650,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5671,7 +5671,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified boolean array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5689,7 +5689,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified byte array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5707,7 +5707,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified char array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5725,7 +5725,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified double array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5743,7 +5743,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified float array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5761,7 +5761,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified int array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5779,7 +5779,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified long array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5797,7 +5797,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified short array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5815,7 +5815,7 @@ public class ArrayUtils {
* Removes the occurrences of the specified element from the specified array.
* <p>
* All subsequent elements are shifted to the left (subtracts one from their indices).
* If the array doesn't contains such an element, no elements are removed from the array.
* If the array doesn't contain such an element, no elements are removed from the array.
* {@code null} will be returned if the input array is {@code null}.
* </p>
*
@ -5833,7 +5833,7 @@ public class ArrayUtils {
/**
* Removes the first occurrence of the specified element from the
* specified array. All subsequent elements are shifted to the left
* (subtracts one from their indices). If the array doesn't contains
* (subtracts one from their indices). If the array doesn't contain
* such an element, no elements are removed from the array.
* <p>
* This method returns a new array with the same elements of the input
@ -5866,7 +5866,7 @@ public class ArrayUtils {
/**
* Removes the first occurrence of the specified element from the
* specified array. All subsequent elements are shifted to the left
* (subtracts one from their indices). If the array doesn't contains
* (subtracts one from their indices). If the array doesn't contain
* such an element, no elements are removed from the array.
* <p>
* This method returns a new array with the same elements of the input
@ -5899,7 +5899,7 @@ public class ArrayUtils {
/**
* Removes the first occurrence of the specified element from the
* specified array. All subsequent elements are shifted to the left
* (subtracts one from their indices). If the array doesn't contains
* (subtracts one from their indices). If the array doesn't contain
* such an element, no elements are removed from the array.
* <p>
* This method returns a new array with the same elements of the input
@ -5932,7 +5932,7 @@ public class ArrayUtils {
/**
* Removes the first occurrence of the specified element from the
* specified array. All subsequent elements are shifted to the left
* (subtracts one from their indices). If the array doesn't contains
* (subtracts one from their indices). If the array doesn't contain
* such an element, no elements are removed from the array.
* <p>
* This method returns a new array with the same elements of the input
@ -5965,7 +5965,7 @@ public class ArrayUtils {
/**
* Removes the first occurrence of the specified element from the
* specified array. All subsequent elements are shifted to the left
* (subtracts one from their indices). If the array doesn't contains
* (subtracts one from their indices). If the array doesn't contain
* such an element, no elements are removed from the array.
* <p>
* This method returns a new array with the same elements of the input
@ -5998,7 +5998,7 @@ public class ArrayUtils {
/**
* Removes the first occurrence of the specified element from the
* specified array. All subsequent elements are shifted to the left
* (subtracts one from their indices). If the array doesn't contains
* (subtracts one from their indices). If the array doesn't contain
* such an element, no elements are removed from the array.
* <p>
* This method returns a new array with the same elements of the input
@ -6031,7 +6031,7 @@ public class ArrayUtils {
/**
* Removes the first occurrence of the specified element from the
* specified array. All subsequent elements are shifted to the left
* (subtracts one from their indices). If the array doesn't contains
* (subtracts one from their indices). If the array doesn't contain
* such an element, no elements are removed from the array.
* <p>
* This method returns a new array with the same elements of the input
@ -6064,7 +6064,7 @@ public class ArrayUtils {
/**
* Removes the first occurrence of the specified element from the
* specified array. All subsequent elements are shifted to the left
* (subtracts one from their indices). If the array doesn't contains
* (subtracts one from their indices). If the array doesn't contain
* such an element, no elements are removed from the array.
* <p>
* This method returns a new array with the same elements of the input
@ -6097,7 +6097,7 @@ public class ArrayUtils {
/**
* Removes the first occurrence of the specified element from the
* specified array. All subsequent elements are shifted to the left
* (subtracts one from their indices). If the array doesn't contains
* (subtracts one from their indices). If the array doesn't contain
* such an element, no elements are removed from the array.
* <p>
* This method returns a new array with the same elements of the input
@ -9083,7 +9083,7 @@ public class ArrayUtils {
* an Array containing at least two elements, may be {@code null}
* @return a {@link Map} that was created from the array
* @throws IllegalArgumentException if one element of this Array is
* itself an Array containing less then two elements
* itself an Array containing less than two elements
* @throws IllegalArgumentException if the array contains elements other
* than {@link java.util.Map.Entry} and an Array
*/

View File

@ -501,8 +501,8 @@ public class BooleanUtils {
* </pre>
*
* @param str the String to check
* @param trueString the String to match for {@code true} (case sensitive), may be {@code null}
* @param falseString the String to match for {@code false} (case sensitive), may be {@code null}
* @param trueString the String to match for {@code true} (case-sensitive), may be {@code null}
* @param falseString the String to match for {@code false} (case-sensitive), may be {@code null}
* @return the boolean value of the string
* @throws IllegalArgumentException if the String doesn't match
*/
@ -586,7 +586,7 @@ public class BooleanUtils {
* @param value the Integer to convert
* @param trueValue the value to match for {@code true}
* @param falseValue the value to match for {@code false}
* @param nullValue the value to to match for {@code null}
* @param nullValue the value to match for {@code null}
* @return Boolean.TRUE, Boolean.FALSE, or {@code null}
* @throws IllegalArgumentException if no match
*/
@ -650,7 +650,7 @@ public class BooleanUtils {
* @param value the Integer to convert
* @param trueValue the value to match for {@code true}, may be {@code null}
* @param falseValue the value to match for {@code false}, may be {@code null}
* @param nullValue the value to to match for {@code null}, may be {@code null}
* @param nullValue the value to match for {@code null}, may be {@code null}
* @return Boolean.TRUE, Boolean.FALSE, or {@code null}
* @throws IllegalArgumentException if no match
*/
@ -823,9 +823,9 @@ public class BooleanUtils {
* </pre>
*
* @param str the String to check
* @param trueString the String to match for {@code true} (case sensitive), may be {@code null}
* @param falseString the String to match for {@code false} (case sensitive), may be {@code null}
* @param nullString the String to match for {@code null} (case sensitive), may be {@code null}
* @param trueString the String to match for {@code true} (case-sensitive), may be {@code null}
* @param falseString the String to match for {@code false} (case-sensitive), may be {@code null}
* @param nullString the String to match for {@code null} (case-sensitive), may be {@code null}
* @return the Boolean value of the string, {@code null} if either the String matches {@code nullString}
* or if {@code null} input and {@code nullString} is {@code null}
* @throws IllegalArgumentException if the String doesn't match

View File

@ -284,7 +284,7 @@ public class CharSequenceUtils {
* Green implementation of regionMatches.
*
* @param cs the {@link CharSequence} to be processed
* @param ignoreCase whether or not to be case insensitive
* @param ignoreCase whether or not to be case-insensitive
* @param thisStart the index to start on the {@code cs} CharSequence
* @param substring the {@link CharSequence} to be looked for
* @param start the index to start on the {@code substring} CharSequence

View File

@ -136,7 +136,7 @@ public class EnumUtils {
* @param values the values we want to convert, not {@code null}, neither containing {@code null}
* @param <E> the type of the enumeration
* @return a long[] whose values provide a binary representation of the given set of enum values
* with least significant digits rightmost.
* with the least significant digits rightmost.
* @throws NullPointerException if {@code enumClass} or {@code values} is {@code null}
* @throws IllegalArgumentException if {@code enumClass} is not an enum class, or if any {@code values} {@code null}
* @since 3.2
@ -166,7 +166,7 @@ public class EnumUtils {
* @param values the values we want to convert, not {@code null}, neither containing {@code null}
* @param <E> the type of the enumeration
* @return a long[] whose values provide a binary representation of the given set of enum values
* with least significant digits rightmost.
* with the least significant digits rightmost.
* @throws NullPointerException if {@code enumClass} or {@code values} is {@code null}
* @throws IllegalArgumentException if {@code enumClass} is not an enum class, or if any {@code values} {@code null}
* @since 3.2
@ -411,7 +411,7 @@ public class EnumUtils {
*
* <p>If you store this value, beware any changes to the enum that would affect ordinal values.</p>
* @param enumClass the class of the enum we are working with, not {@code null}
* @param values the long[] bearing the representation of a set of enum values, least significant digits rightmost, not {@code null}
* @param values the long[] bearing the representation of a set of enum values, the least significant digits rightmost, not {@code null}
* @param <E> the type of the enumeration
* @return a set of enum values
* @throws NullPointerException if {@code enumClass} is {@code null}

View File

@ -516,7 +516,7 @@ public class Functions {
* follow the method call, like a {@code return} statement from a value returning method.
* </p>
*
* @param throwable The throwable to rethrow ossibly wrapped into an unchecked exception
* @param throwable The throwable to rethrow possibly wrapped into an unchecked exception
* @return Never returns anything, this method never terminates normally.
*/
public static RuntimeException rethrow(final Throwable throwable) {
@ -612,7 +612,7 @@ public class Functions {
* {@link AutoCloseable} interface. The method executes the {@code action}. The method guarantees, that <em>all</em>
* the {@code resources} are being executed, in the given order, afterwards, and regardless of success, or failure.
* If either the original action, or any of the resource action fails, then the <em>first</em> failure (AKA
* {@link Throwable} is rethrown. Example use:
* {@link Throwable}) is rethrown. Example use:
*
* <pre>
* {@code
@ -673,7 +673,7 @@ public class Functions {
* {@link AutoCloseable} interface. The method executes the {@code action}. The method guarantees, that <em>all</em>
* the {@code resources} are being executed, in the given order, afterwards, and regardless of success, or failure.
* If either the original action, or any of the resource action fails, then the <em>first</em> failure (AKA
* {@link Throwable} is rethrown. Example use:
* {@link Throwable}) is rethrown. Example use:
*
* <pre>
* {@code

View File

@ -158,7 +158,7 @@ public class LocaleUtils {
* <p>This method takes a country code and searches to find the
* languages available for that country. Variant locales are removed.</p>
*
* @param countryCode the 2 letter country code, null returns empty
* @param countryCode the 2-letter country code, null returns empty
* @return an unmodifiable List of Locale objects, not null
*/
public static List<Locale> languagesByCountry(final String countryCode) {

View File

@ -39,8 +39,8 @@ public final class Range<T> implements Serializable {
/**
* Comparable based compare implementation.
*
* @param obj1 left hand side of comparison
* @param obj2 right hand side of comparison
* @param obj1 left-hand side of comparison
* @param obj2 right-hand side of comparison
* @return negative, 0, positive comparison value
*/
@Override

View File

@ -482,7 +482,7 @@ public class StringUtils {
/**
* Appends the suffix to the end of the string if the string does not
* already end, case insensitive, with any of the suffixes.
* already end, case-insensitive, with any of the suffixes.
*
* <pre>
* StringUtils.appendIfMissingIgnoreCase(null, null) = null
@ -1455,7 +1455,7 @@ public class StringUtils {
return 0;
}
int count = 0;
// We could also call str.toCharArray() for faster look ups but that would generate more garbage.
// We could also call str.toCharArray() for faster lookups but that would generate more garbage.
for (int i = 0; i < str.length(); i++) {
if (ch == str.charAt(i)) {
count++;
@ -1669,7 +1669,7 @@ public class StringUtils {
* <p>Check if a CharSequence ends with a specified suffix.</p>
*
* <p>{@code null}s are handled without exceptions. Two {@code null}
* references are considered to be equal. The comparison is case sensitive.</p>
* references are considered to be equal. The comparison is case-sensitive.</p>
*
* <pre>
* StringUtils.endsWith(null, null) = true
@ -1684,7 +1684,7 @@ public class StringUtils {
* @see java.lang.String#endsWith(String)
* @param str the CharSequence to check, may be null
* @param suffix the suffix to find, may be null
* @return {@code true} if the CharSequence ends with the suffix, case sensitive, or
* @return {@code true} if the CharSequence ends with the suffix, case-sensitive, or
* both {@code null}
* @since 2.4
* @since 3.0 Changed signature from endsWith(String, String) to endsWith(CharSequence, CharSequence)
@ -1700,7 +1700,7 @@ public class StringUtils {
* @param str the CharSequence to check, may be null
* @param suffix the suffix to find, may be null
* @param ignoreCase indicates whether the compare should ignore case
* (case insensitive) or not.
* (case-insensitive) or not.
* @return {@code true} if the CharSequence starts with the prefix or
* both {@code null}
*/
@ -1766,7 +1766,7 @@ public class StringUtils {
* @see java.lang.String#endsWith(String)
* @param str the CharSequence to check, may be null
* @param suffix the suffix to find, may be null
* @return {@code true} if the CharSequence ends with the suffix, case insensitive, or
* @return {@code true} if the CharSequence ends with the suffix, case-insensitive, or
* both {@code null}
* @since 2.4
* @since 3.0 Changed signature from endsWithIgnoreCase(String, String) to endsWithIgnoreCase(CharSequence, CharSequence)
@ -1780,7 +1780,7 @@ public class StringUtils {
* equal sequences of characters.</p>
*
* <p>{@code null}s are handled without exceptions. Two {@code null}
* references are considered to be equal. The comparison is <strong>case sensitive</strong>.</p>
* references are considered to be equal. The comparison is <strong>case-sensitive</strong>.</p>
*
* <pre>
* StringUtils.equals(null, null) = true
@ -2123,7 +2123,7 @@ public class StringUtils {
*
* @param term a full term that should be matched against, must not be null
* @param query the query that will be matched against a term, must not be null
* @param locale This string matching logic is case insensitive. A locale is necessary to normalize
* @param locale This string matching logic is case-insensitive. A locale is necessary to normalize
* both Strings to lower case.
* @return result score
* @throws IllegalArgumentException if either String input {@code null} or Locale input {@code null}
@ -2141,7 +2141,7 @@ public class StringUtils {
throw new IllegalArgumentException("Locale must not be null");
}
// fuzzy logic is case insensitive. We normalize the Strings to lower
// fuzzy logic is case-insensitive. We normalize the Strings to lower
// case right from the start. Turning characters to lower case
// via Character.toLowerCase(char) is unfortunately insufficient
// as it does not accept a locale.
@ -3537,7 +3537,7 @@ public class StringUtils {
*
* @param cs the CharSequence to check, may be null
* @return {@code true} if every character is in the range
* 32 thru 126
* 32 through 126
* @since 2.1
* @since 3.0 Changed signature from isAsciiPrintable(String) to isAsciiPrintable(CharSequence)
*/
@ -5682,7 +5682,7 @@ public class StringUtils {
int index = lastIndex ? str.length() : INDEX_NOT_FOUND;
do {
if (lastIndex) {
index = CharSequenceUtils.lastIndexOf(str, searchStr, index - 1); // step backwards thru string
index = CharSequenceUtils.lastIndexOf(str, searchStr, index - 1); // step backwards through string
} else {
index = CharSequenceUtils.indexOf(str, searchStr, index + 1); // step forwards through string
}
@ -5818,7 +5818,7 @@ public class StringUtils {
/**
* Prepends the prefix to the start of the string if the string does not
* already start, case insensitive, with any of the prefixes.
* already start, case-insensitive, with any of the prefixes.
*
* <pre>
* StringUtils.prependIfMissingIgnoreCase(null, null) = null
@ -6022,7 +6022,7 @@ public class StringUtils {
* </pre>
*
* @param str the source String to search, may be null
* @param remove the String to search for (case insensitive) and remove, may be null
* @param remove the String to search for (case-insensitive) and remove, may be null
* @return the substring with the string removed if found,
* {@code null} if null String input
* @since 2.4
@ -6113,7 +6113,7 @@ public class StringUtils {
* @param str
* the source String to search, may be null
* @param remove
* the String to search for (case insensitive) and remove, may be
* the String to search for (case-insensitive) and remove, may be
* null
* @return the substring with the string removed if found, {@code null} if
* null String input
@ -6244,7 +6244,7 @@ public class StringUtils {
* </pre>
*
* @param str the source String to search, may be null
* @param remove the String to search for (case insensitive) and remove, may be null
* @param remove the String to search for (case-insensitive) and remove, may be null
* @return the substring with the string removed if found,
* {@code null} if null String input
* @since 2.4
@ -6434,7 +6434,7 @@ public class StringUtils {
/**
* <p>Replaces a String with another String inside a larger String,
* for the first {@code max} values of the search String,
* case sensitively/insensitively based on {@code ignoreCase} value.</p>
* case-sensitively/insensitively based on {@code ignoreCase} value.</p>
*
* <p>A {@code null} reference passed to this method is a no-op.</p>
*
@ -6455,10 +6455,10 @@ public class StringUtils {
* </pre>
*
* @param text text to search and replace in, may be null
* @param searchString the String to search for (case insensitive), may be null
* @param searchString the String to search for (case-insensitive), may be null
* @param replacement the String to replace it with, may be null
* @param max maximum number of values to replace, or {@code -1} if no maximum
* @param ignoreCase if true replace is case insensitive, otherwise case sensitive
* @param ignoreCase if true replace is case-insensitive, otherwise case-sensitive
* @return the text with any replacements processed,
* {@code null} if null String input
*/
@ -6973,7 +6973,7 @@ public class StringUtils {
*
* @see #replaceIgnoreCase(String text, String searchString, String replacement, int max)
* @param text text to search and replace in, may be null
* @param searchString the String to search for (case insensitive), may be null
* @param searchString the String to search for (case-insensitive), may be null
* @param replacement the String to replace it with, may be null
* @return the text with any replacements processed,
* {@code null} if null String input
@ -7005,7 +7005,7 @@ public class StringUtils {
* </pre>
*
* @param text text to search and replace in, may be null
* @param searchString the String to search for (case insensitive), may be null
* @param searchString the String to search for (case-insensitive), may be null
* @param replacement the String to replace it with, may be null
* @param max maximum number of values to replace, or {@code -1} if no maximum
* @return the text with any replacements processed,
@ -7062,7 +7062,7 @@ public class StringUtils {
*
* @see #replaceIgnoreCase(String text, String searchString, String replacement, int max)
* @param text text to search and replace in, may be null
* @param searchString the String to search for (case insensitive), may be null
* @param searchString the String to search for (case-insensitive), may be null
* @param replacement the String to replace with, may be null
* @return the text with any replacements processed,
* {@code null} if null String input
@ -8063,7 +8063,7 @@ public class StringUtils {
* <p>Check if a CharSequence starts with a specified prefix.</p>
*
* <p>{@code null}s are handled without exceptions. Two {@code null}
* references are considered to be equal. The comparison is case sensitive.</p>
* references are considered to be equal. The comparison is case-sensitive.</p>
*
* <pre>
* StringUtils.startsWith(null, null) = true
@ -8076,7 +8076,7 @@ public class StringUtils {
* @see java.lang.String#startsWith(String)
* @param str the CharSequence to check, may be null
* @param prefix the prefix to find, may be null
* @return {@code true} if the CharSequence starts with the prefix, case sensitive, or
* @return {@code true} if the CharSequence starts with the prefix, case-sensitive, or
* both {@code null}
* @since 2.4
* @since 3.0 Changed signature from startsWith(String, String) to startsWith(CharSequence, CharSequence)
@ -8092,7 +8092,7 @@ public class StringUtils {
* @param str the CharSequence to check, may be null
* @param prefix the prefix to find, may be null
* @param ignoreCase indicates whether the compare should ignore case
* (case insensitive) or not.
* (case-insensitive) or not.
* @return {@code true} if the CharSequence starts with the prefix or
* both {@code null}
*/
@ -8159,7 +8159,7 @@ public class StringUtils {
* @see java.lang.String#startsWith(String)
* @param str the CharSequence to check, may be null
* @param prefix the prefix to find, may be null
* @return {@code true} if the CharSequence starts with the prefix, case insensitive, or
* @return {@code true} if the CharSequence starts with the prefix, case-insensitive, or
* both {@code null}
* @since 2.4
* @since 3.0 Changed signature from startsWithIgnoreCase(String, String) to startsWithIgnoreCase(CharSequence, CharSequence)
@ -9450,7 +9450,7 @@ public class StringUtils {
* should be used with a specific locale (e.g. {@link Locale#ENGLISH}).</p>
*
* @param str the String to upper case, may be null
* @return the upper cased String, {@code null} if null String input
* @return the upper-cased String, {@code null} if null String input
*/
public static String upperCase(final String str) {
if (str == null) {
@ -9472,7 +9472,7 @@ public class StringUtils {
*
* @param str the String to upper case, may be null
* @param locale the locale that defines the case transformation rules, must not be null
* @return the upper cased String, {@code null} if null String input
* @return the upper-cased String, {@code null} if null String input
* @since 2.5
*/
public static String upperCase(final String str, final Locale locale) {

View File

@ -143,7 +143,7 @@ public class Processor {
/**
* Gets the processor type as {@link Type} enum.
* The processor type defines, if the processor is for example
* a x86 or PPA.
* an x86 or PPA.
*
* @return A {@link Type} enum.
*/

View File

@ -433,7 +433,7 @@ public class CompareToBuilder implements Builder<Integer> {
private void appendArray(final Object lhs, final Object rhs, final Comparator<?> comparator) {
// switch on type of array, to dispatch to the correct handler
// handles multi dimensional arrays
// handles multidimensional arrays
// throws a ClassCastException if rhs is not the correct array type
if (lhs instanceof long[]) {
append((long[]) lhs, (long[]) rhs);

View File

@ -158,9 +158,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code boolean}
* the left-hand {@code boolean}
* @param rhs
* the right hand {@code boolean}
* the right-hand {@code boolean}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -198,9 +198,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code boolean[]}
* the left-hand {@code boolean[]}
* @param rhs
* the right hand {@code boolean[]}
* the right-hand {@code boolean[]}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -237,9 +237,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code byte}
* the left-hand {@code byte}
* @param rhs
* the right hand {@code byte}
* the right-hand {@code byte}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -276,9 +276,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code byte[]}
* the left-hand {@code byte[]}
* @param rhs
* the right hand {@code byte[]}
* the right-hand {@code byte[]}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -316,9 +316,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code char}
* the left-hand {@code char}
* @param rhs
* the right hand {@code char}
* the right-hand {@code char}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -356,9 +356,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code char[]}
* the left-hand {@code char[]}
* @param rhs
* the right hand {@code char[]}
* the right-hand {@code char[]}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -396,9 +396,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code double}
* the left-hand {@code double}
* @param rhs
* the right hand {@code double}
* the right-hand {@code double}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -436,9 +436,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code double[]}
* the left-hand {@code double[]}
* @param rhs
* the right hand {@code double[]}
* the right-hand {@code double[]}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -476,9 +476,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code float}
* the left-hand {@code float}
* @param rhs
* the right hand {@code float}
* the right-hand {@code float}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -516,9 +516,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code float[]}
* the left-hand {@code float[]}
* @param rhs
* the right hand {@code float[]}
* the right-hand {@code float[]}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -556,9 +556,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code int}
* the left-hand {@code int}
* @param rhs
* the right hand {@code int}
* the right-hand {@code int}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -596,9 +596,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code int[]}
* the left-hand {@code int[]}
* @param rhs
* the right hand {@code int[]}
* the right-hand {@code int[]}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -636,9 +636,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code long}
* the left-hand {@code long}
* @param rhs
* the right hand {@code long}
* the right-hand {@code long}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -676,9 +676,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code long[]}
* the left-hand {@code long[]}
* @param rhs
* the right hand {@code long[]}
* the right-hand {@code long[]}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -716,9 +716,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code short}
* the left-hand {@code short}
* @param rhs
* the right hand {@code short}
* the right-hand {@code short}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -756,9 +756,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code short[]}
* the left-hand {@code short[]}
* @param rhs
* the right hand {@code short[]}
* the right-hand {@code short[]}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -796,9 +796,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@link Object}
* the left-hand {@link Object}
* @param rhs
* the right hand {@link Object}
* the right-hand {@link Object}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}
@ -880,9 +880,9 @@ public class DiffBuilder<T> implements Builder<DiffResult<T>> {
* @param fieldName
* the field name
* @param lhs
* the left hand {@code Object[]}
* the left-hand {@code Object[]}
* @param rhs
* the right hand {@code Object[]}
* the right-hand {@code Object[]}
* @return this
* @throws IllegalArgumentException
* if field name is {@code null}

View File

@ -60,9 +60,9 @@ public class DiffResult<T> implements Iterable<Diff<?>> {
* </p>
*
* @param lhs
* the left hand object
* the left-hand object
* @param rhs
* the right hand object
* the right-hand object
* @param diffList
* the list of differences, may be empty
* @param style

View File

@ -438,7 +438,7 @@ public class EqualsBuilder implements Builder<Boolean> {
* @param testTransients whether to include transient fields
* @param reflectUpToClass the superclass to reflect up to (inclusive),
* may be {@code null}
* @param testRecursive whether to call reflection equals on non primitive
* @param testRecursive whether to call reflection equals on non-primitive
* fields recursively.
* @param excludeFields array of field names to exclude from testing
* @return {@code true} if the two Objects have tested equals.
@ -484,10 +484,10 @@ public class EqualsBuilder implements Builder<Boolean> {
*
* <p>If either class of the compared objects is contained in
* {@code bypassReflectionClasses}, both objects are compared by calling
* the equals method of the left hand object with the right hand object as an argument.</p>
* the equals method of the left-hand object with the right-hand object as an argument.</p>
*
* @param lhs the left hand object
* @param rhs the left hand object
* @param lhs the left-hand object
* @param rhs the right-hand object
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder reflectionAppend(final Object lhs, final Object rhs) {
@ -556,8 +556,8 @@ public class EqualsBuilder implements Builder<Boolean> {
* <p>Appends the fields and values defined by the given object of the
* given Class.</p>
*
* @param lhs the left hand object
* @param rhs the right hand object
* @param lhs the left-hand object
* @param rhs the right-hand object
* @param clazz the class to append details of
*/
private void reflectionAppend(
@ -616,8 +616,8 @@ public class EqualsBuilder implements Builder<Boolean> {
* is set to {@code false}. Otherwise, using their
* {@code equals} method.</p>
*
* @param lhs the left hand object
* @param rhs the right hand object
* @param lhs the left-hand object
* @param rhs the right-hand object
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final Object lhs, final Object rhs) {
@ -648,13 +648,13 @@ public class EqualsBuilder implements Builder<Boolean> {
/**
* <p>Test if an {@link Object} is equal to an array.</p>
*
* @param lhs the left hand object, an array
* @param rhs the right hand object
* @param lhs the left-hand object, an array
* @param rhs the right-hand object
*/
private void appendArray(final Object lhs, final Object rhs) {
// First we compare different dimensions, for example: a boolean[][] to a boolean[]
// then we 'Switch' on type of array, to dispatch to the correct handler
// This handles multi dimensional arrays of the same depth
// This handles multidimensional arrays of the same depth
if (lhs.getClass() != rhs.getClass()) {
this.setEquals(false);
} else if (lhs instanceof long[]) {
@ -685,9 +685,9 @@ public class EqualsBuilder implements Builder<Boolean> {
* </p>
*
* @param lhs
* the left hand {@code long}
* the left-hand {@code long}
* @param rhs
* the right hand {@code long}
* the right-hand {@code long}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final long lhs, final long rhs) {
@ -701,8 +701,8 @@ public class EqualsBuilder implements Builder<Boolean> {
/**
* <p>Test if two {@code int}s are equal.</p>
*
* @param lhs the left hand {@code int}
* @param rhs the right hand {@code int}
* @param lhs the left-hand {@code int}
* @param rhs the right-hand {@code int}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final int lhs, final int rhs) {
@ -716,8 +716,8 @@ public class EqualsBuilder implements Builder<Boolean> {
/**
* <p>Test if two {@code short}s are equal.</p>
*
* @param lhs the left hand {@code short}
* @param rhs the right hand {@code short}
* @param lhs the left-hand {@code short}
* @param rhs the right-hand {@code short}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final short lhs, final short rhs) {
@ -731,8 +731,8 @@ public class EqualsBuilder implements Builder<Boolean> {
/**
* <p>Test if two {@code char}s are equal.</p>
*
* @param lhs the left hand {@code char}
* @param rhs the right hand {@code char}
* @param lhs the left-hand {@code char}
* @param rhs the right-hand {@code char}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final char lhs, final char rhs) {
@ -746,8 +746,8 @@ public class EqualsBuilder implements Builder<Boolean> {
/**
* <p>Test if two {@code byte}s are equal.</p>
*
* @param lhs the left hand {@code byte}
* @param rhs the right hand {@code byte}
* @param lhs the left-hand {@code byte}
* @param rhs the right-hand {@code byte}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final byte lhs, final byte rhs) {
@ -767,8 +767,8 @@ public class EqualsBuilder implements Builder<Boolean> {
* <p>It is compatible with the hash code generated by
* {@link HashCodeBuilder}.</p>
*
* @param lhs the left hand {@code double}
* @param rhs the right hand {@code double}
* @param lhs the left-hand {@code double}
* @param rhs the right-hand {@code double}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final double lhs, final double rhs) {
@ -787,8 +787,8 @@ public class EqualsBuilder implements Builder<Boolean> {
* <p>It is compatible with the hash code generated by
* {@link HashCodeBuilder}.</p>
*
* @param lhs the left hand {@code float}
* @param rhs the right hand {@code float}
* @param lhs the left-hand {@code float}
* @param rhs the right-hand {@code float}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final float lhs, final float rhs) {
@ -801,8 +801,8 @@ public class EqualsBuilder implements Builder<Boolean> {
/**
* <p>Test if two {@code booleans}s are equal.</p>
*
* @param lhs the left hand {@code boolean}
* @param rhs the right hand {@code boolean}
* @param lhs the left-hand {@code boolean}
* @param rhs the right-hand {@code boolean}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final boolean lhs, final boolean rhs) {
@ -822,8 +822,8 @@ public class EqualsBuilder implements Builder<Boolean> {
* <p>Note that this method does not compare the type of the arrays; it only
* compares the contents.</p>
*
* @param lhs the left hand {@code Object[]}
* @param rhs the right hand {@code Object[]}
* @param lhs the left-hand {@code Object[]}
* @param rhs the right-hand {@code Object[]}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final Object[] lhs, final Object[] rhs) {
@ -853,8 +853,8 @@ public class EqualsBuilder implements Builder<Boolean> {
*
* <p>The method {@link #append(long, long)} is used.</p>
*
* @param lhs the left hand {@code long[]}
* @param rhs the right hand {@code long[]}
* @param lhs the left-hand {@code long[]}
* @param rhs the right-hand {@code long[]}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final long[] lhs, final long[] rhs) {
@ -884,8 +884,8 @@ public class EqualsBuilder implements Builder<Boolean> {
*
* <p>The method {@link #append(int, int)} is used.</p>
*
* @param lhs the left hand {@code int[]}
* @param rhs the right hand {@code int[]}
* @param lhs the left-hand {@code int[]}
* @param rhs the right-hand {@code int[]}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final int[] lhs, final int[] rhs) {
@ -915,8 +915,8 @@ public class EqualsBuilder implements Builder<Boolean> {
*
* <p>The method {@link #append(short, short)} is used.</p>
*
* @param lhs the left hand {@code short[]}
* @param rhs the right hand {@code short[]}
* @param lhs the left-hand {@code short[]}
* @param rhs the right-hand {@code short[]}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final short[] lhs, final short[] rhs) {
@ -946,8 +946,8 @@ public class EqualsBuilder implements Builder<Boolean> {
*
* <p>The method {@link #append(char, char)} is used.</p>
*
* @param lhs the left hand {@code char[]}
* @param rhs the right hand {@code char[]}
* @param lhs the left-hand {@code char[]}
* @param rhs the right-hand {@code char[]}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final char[] lhs, final char[] rhs) {
@ -977,8 +977,8 @@ public class EqualsBuilder implements Builder<Boolean> {
*
* <p>The method {@link #append(byte, byte)} is used.</p>
*
* @param lhs the left hand {@code byte[]}
* @param rhs the right hand {@code byte[]}
* @param lhs the left-hand {@code byte[]}
* @param rhs the right-hand {@code byte[]}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final byte[] lhs, final byte[] rhs) {
@ -1008,8 +1008,8 @@ public class EqualsBuilder implements Builder<Boolean> {
*
* <p>The method {@link #append(double, double)} is used.</p>
*
* @param lhs the left hand {@code double[]}
* @param rhs the right hand {@code double[]}
* @param lhs the left-hand {@code double[]}
* @param rhs the right-hand {@code double[]}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final double[] lhs, final double[] rhs) {
@ -1039,8 +1039,8 @@ public class EqualsBuilder implements Builder<Boolean> {
*
* <p>The method {@link #append(float, float)} is used.</p>
*
* @param lhs the left hand {@code float[]}
* @param rhs the right hand {@code float[]}
* @param lhs the left-hand {@code float[]}
* @param rhs the right-hand {@code float[]}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final float[] lhs, final float[] rhs) {
@ -1070,8 +1070,8 @@ public class EqualsBuilder implements Builder<Boolean> {
*
* <p>The method {@link #append(boolean, boolean)} is used.</p>
*
* @param lhs the left hand {@code boolean[]}
* @param rhs the right hand {@code boolean[]}
* @param lhs the left-hand {@code boolean[]}
* @param rhs the right-hand {@code boolean[]}
* @return EqualsBuilder - used to chain calls.
*/
public EqualsBuilder append(final boolean[] lhs, final boolean[] rhs) {

View File

@ -857,7 +857,7 @@ public class HashCodeBuilder implements Builder<Integer> {
*/
private void appendArray(final Object object) {
// 'Switch' on type of array, to dispatch to the correct handler
// This handles multi dimensional arrays
// This handles multidimensional arrays
if (object instanceof long[]) {
append((long[]) object);
} else if (object instanceof int[]) {

View File

@ -86,7 +86,7 @@ public class RecursiveToStringStyle extends ToStringStyle {
/**
* Returns whether or not to recursively format the given {@link Class}.
* By default, this method always returns {@code true}, but may be overwritten by
* sub-classes to filter specific classes.
* subclasses to filter specific classes.
*
* @param clazz
* The class to test.

View File

@ -215,7 +215,7 @@ public class ComparableUtils {
* @param <A> Type of what we are comparing.
* @param comparable1 an argument.
* @param comparable2 another argument.
* @return the larger of {@code c1} and {@code c2}.
* @return the largest of {@code c1} and {@code c2}.
* @see ObjectUtils#max(Comparable...)
* @since 3.13.0
*/
@ -232,7 +232,7 @@ public class ComparableUtils {
* @param <A> Type of what we are comparing.
* @param comparable1 an argument.
* @param comparable2 another argument.
* @return the larger of {@code c1} and {@code c2}.
* @return the largest of {@code c1} and {@code c2}.
* @see ObjectUtils#min(Comparable...)
* @since 3.13.0
*/

View File

@ -257,7 +257,7 @@ public class TimedSemaphore {
}
/**
* Initializes a shutdown. After that the object cannot be used any more.
* Initializes a shutdown. After that the object cannot be used anymore.
* This method can be invoked an arbitrary number of times. All invocations
* after the first one do not have any effect.
*/
@ -357,7 +357,7 @@ public class TimedSemaphore {
* can give an indication whether it is safe to call the {@link #acquire()}
* method without risking to be suspended. However, there is no guarantee
* that a subsequent call to {@link #acquire()} actually is not-blocking
* because in the mean time other threads may have invoked the semaphore.
* because in the meantime other threads may have invoked the semaphore.
*
* @return the current number of available {@link #acquire()} calls in the
* current period

View File

@ -80,7 +80,7 @@ public class EventListenerSupport<L> implements Serializable {
/**
* The proxy representing the collection of listeners. Calls to this proxy
* object will sent to all registered listeners.
* object will be sent to all registered listeners.
*/
private transient L proxy;

View File

@ -403,7 +403,7 @@ public class Failable {
* follow the method call, like a {@code return} statement from a value returning method.
* </p>
*
* @param throwable The throwable to rethrow ossibly wrapped into an unchecked exception
* @param throwable The throwable to rethrow possibly wrapped into an unchecked exception
* @return Never returns anything, this method never terminates normally.
*/
public static RuntimeException rethrow(final Throwable throwable) {
@ -498,7 +498,7 @@ public class Failable {
* {@link AutoCloseable} interface. The method executes the {@code action}. The method guarantees, that <em>all</em>
* the {@code resources} are being executed, in the given order, afterwards, and regardless of success, or failure.
* If either the original action, or any of the resource action fails, then the <em>first</em> failure (AKA
* {@link Throwable} is rethrown. Example use:
* {@link Throwable}) is rethrown. Example use:
*
* <pre>
* final FileInputStream fis = new FileInputStream("my.file");
@ -558,7 +558,7 @@ public class Failable {
* {@link AutoCloseable} interface. The method executes the {@code action}. The method guarantees, that <em>all</em>
* the {@code resources} are being executed, in the given order, afterwards, and regardless of success, or failure.
* If either the original action, or any of the resource action fails, then the <em>first</em> failure (AKA
* {@link Throwable} is rethrown. Example use:
* {@link Throwable}) is rethrown. Example use:
*
* <pre>
* final FileInputStream fis = new FileInputStream("my.file");

View File

@ -85,7 +85,7 @@ public interface FailableFunction<T, R, E extends Throwable> {
*
* @param <V> the input type to the {@code before} function, and to the composed function.
* @param before the operator to apply before this one.
* @return a a composed {@link FailableFunction} like {@link Function#compose(Function)}.
* @return a composed {@link FailableFunction} like {@link Function#compose(Function)}.
* @throws NullPointerException if before is null.
* @see #andThen(FailableFunction)
*/

View File

@ -593,7 +593,7 @@ public final class Fraction extends Number implements Comparable<Fraction> {
do {
/* assert u<0 && v<0; */
// B4/B3: cast out twos from t.
while ((t & 1) == 0) { // while t is even..
while ((t & 1) == 0) { // while t is even.
t /= 2; // cast out twos
}
// B5 [reset max(u,v)]

View File

@ -305,7 +305,7 @@ public class NumberUtils {
*
* <pre>
* NumberUtils.toDouble(null) = 0.0d
* NumberUtils.toDouble(BigDecimal.valudOf(8.5d)) = 8.5d
* NumberUtils.toDouble(BigDecimal.valueOf(8.5d)) = 8.5d
* </pre>
*
* @param value the {@link BigDecimal} to convert, may be {@code null}.
@ -325,7 +325,7 @@ public class NumberUtils {
*
* <pre>
* NumberUtils.toDouble(null, 1.1d) = 1.1d
* NumberUtils.toDouble(BigDecimal.valudOf(8.5d), 1.1d) = 8.5d
* NumberUtils.toDouble(BigDecimal.valueOf(8.5d), 1.1d) = 8.5d
* </pre>
*
* @param value the {@link BigDecimal} to convert, may be {@code null}.
@ -733,7 +733,7 @@ public class NumberUtils {
} else {
exp = null;
}
//Requesting a specific type..
//Requesting a specific type.
final String numeric = str.substring(0, length - 1);
switch (lastChar) {
case 'l' :

View File

@ -314,7 +314,7 @@ public class MutableInt extends Number implements Comparable<MutableInt>, Mutabl
/**
* Gets this mutable as an instance of Integer.
*
* @return a Integer instance containing the value from this mutable, never null
* @return an Integer instance containing the value from this mutable, never null
*/
public Integer toInteger() {
return Integer.valueOf(intValue());

View File

@ -203,7 +203,7 @@ final class MemberUtils {
}
/**
* Gets the number of steps required needed to turn the source class into
* Gets the number of steps needed to turn the source class into
* the destination class. This represents the number of steps in the object
* hierarchy graph.
* @param srcClass The source class

View File

@ -891,7 +891,7 @@ public class MethodUtils {
* @param searchSupers
* determines if a lookup in the entire inheritance hierarchy of the given class should be performed
* @param ignoreAccess
* determines if non public methods should be considered
* determines if non-public methods should be considered
* @return an array of Methods (possibly empty).
* @throws NullPointerException if the class or annotation are {@code null}
* @since 3.6
@ -910,7 +910,7 @@ public class MethodUtils {
* @param searchSupers
* determines if a lookup in the entire inheritance hierarchy of the given class should be performed
* @param ignoreAccess
* determines if non public methods should be considered
* determines if non-public methods should be considered
* @return a list of Methods (possibly empty).
* @throws NullPointerException if either the class or annotation class is {@code null}
* @since 3.6

View File

@ -1805,7 +1805,7 @@ public class TypeUtils {
* found is <em>not</em> a type variable.
*
* @param typeVariable the type variable to look up
* @param typeVarAssigns the map used for the look up
* @param typeVarAssigns the map used for the look-up
* @return Type or {@code null} if some variable was not in the map
* @since 3.2
*/

View File

@ -1502,7 +1502,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
/**
* Appends an object to the builder padding on the left to a fixed width.
* The {@code toString} of the object is used.
* If the object is larger than the length, the left hand side is lost.
* If the object is larger than the length, the left-hand side is lost.
* If the object is null, the null text value is used.
*
* @param obj the object to append, null uses null text
@ -1535,7 +1535,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
/**
* Appends an object to the builder padding on the left to a fixed width.
* The {@code String.valueOf} of the {@code int} value is used.
* If the formatted value is larger than the length, the left hand side is lost.
* If the formatted value is larger than the length, the left-hand side is lost.
*
* @param value the value to append
* @param width the fixed field width, zero or negative has no effect
@ -1549,7 +1549,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
/**
* Appends an object to the builder padding on the right to a fixed length.
* The {@code toString} of the object is used.
* If the object is larger than the length, the right hand side is lost.
* If the object is larger than the length, the right-hand side is lost.
* If the object is null, null text value is used.
*
* @param obj the object to append, null uses null text
@ -1582,7 +1582,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable, Build
/**
* Appends an object to the builder padding on the right to a fixed length.
* The {@code String.valueOf} of the {@code int} value is used.
* If the object is larger than the length, the right hand side is lost.
* If the object is larger than the length, the right-hand side is lost.
*
* @param value the value to append
* @param width the fixed field width, zero or negative has no effect

View File

@ -765,7 +765,7 @@ public class StrSubstitutor {
/**
* Recursive handler for multiple levels of interpolation. This is the main
* interpolation method, which resolves the values of all variable references
* contained in the passed in text.
* contained in the passed-in text.
*
* @param buf the string builder to substitute into, not null
* @param offset the start offset within the builder, must be valid

View File

@ -797,7 +797,7 @@ public class StrTokenizer implements ListIterator<String>, Cloneable {
}
// check for trimmed character
// don't yet know if its at the end, so copy to workArea
// don't yet know if it's at the end, so copy to workArea
// use trimStart to keep track of trim at the end
final int trimmedLen = getTrimmerMatcher().isMatch(srcChars, pos, start, len);
if (trimmedLen > 0) {

View File

@ -115,14 +115,14 @@ public class DurationFormatUtils {
/**
* <p>Formats the time gap as a string, using the specified format.
* Padding the left hand side of numbers with zeroes is optional.</p>
* Padding the left-hand side of numbers with zeroes is optional.</p>
*
* <p>This method formats durations using the days and lower fields of the
* format pattern. Months and larger are not used.</p>
*
* @param durationMillis the duration to format
* @param format the way in which to format the duration, not null
* @param padWithZeros whether to pad the left hand side of numbers with 0's
* @param padWithZeros whether to pad the left-hand side of numbers with 0's
* @return the formatted duration, not null
* @throws IllegalArgumentException if durationMillis is negative
*/
@ -238,7 +238,7 @@ public class DurationFormatUtils {
/**
* <p>Formats the time gap as a string, using the specified format.
* Padding the left hand side of numbers with zeroes is optional.
* Padding the left-hand side of numbers with zeroes is optional.
*
* @param startMillis the start of the duration
* @param endMillis the end of the duration
@ -252,7 +252,7 @@ public class DurationFormatUtils {
/**
* <p>Formats the time gap as a string, using the specified format.
* Padding the left hand side of numbers with zeroes is optional and
* Padding the left-hand side of numbers with zeroes is optional and
* the time zone may be specified. </p>
*
* <p>When calculating the difference between months/days, it chooses to
@ -269,7 +269,7 @@ public class DurationFormatUtils {
* @param startMillis the start of the duration
* @param endMillis the end of the duration
* @param format the way in which to format the duration, not null
* @param padWithZeros whether to pad the left hand side of numbers with 0's
* @param padWithZeros whether to pad the left-hand side of numbers with 0's
* @param timezone the millis are defined in
* @return the formatted duration, not null
* @throws IllegalArgumentException if startMillis is greater than endMillis

View File

@ -390,7 +390,7 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter {
* @param pattern {@link java.text.SimpleDateFormat} compatible pattern
* @param timeZone non-null time zone to use
* @param locale non-null locale to use
* @param centuryStart The start of the 100 year period to use as the "default century" for 2 digit year parsing. If centuryStart is null, defaults to now - 80 years
* @param centuryStart The start of the 100-year period to use as the "default century" for 2 digit year parsing. If centuryStart is null, defaults to now - 80 years
* @throws NullPointerException if pattern, timeZone, or locale is null.
*/
protected FastDateFormat(final String pattern, final TimeZone timeZone, final Locale locale, final Date centuryStart) {

View File

@ -952,7 +952,7 @@ public class FastDateParser implements DateParser, Serializable {
}
}
// order the regex alternatives with longer strings first, greedy
// match will ensure longest string will be consumed
// match will ensure the longest string will be consumed
for (final String zoneName : sorted) {
simpleQuote(sb.append('|'), zoneName);
}

View File

@ -83,7 +83,7 @@ public class FastDatePrinter implements DatePrinter, Serializable {
// A lot of the speed in this class comes from caching, but some comes
// from the special int to StringBuffer conversion.
//
// The following produces a padded 2 digit number:
// The following produces a padded 2-digit number:
// buffer.append((char)(value / 10 + '0'));
// buffer.append((char)(value % 10 + '0'));
//
@ -461,7 +461,7 @@ public class FastDatePrinter implements DatePrinter, Serializable {
/**
* Creates a String representation of the given Calendar by applying the rules of this printer to it.
* @param c the Calender to apply the rules to.
* @param c the Calendar to apply the rules to.
* @return a String representation of the given Calendar.
*/
private String applyRulesToString(final Calendar c) {
@ -1449,7 +1449,7 @@ public class FastDatePrinter implements DatePrinter, Serializable {
* Factory method for Iso8601_Rules.
*
* @param tokenLen a token indicating the length of the TimeZone String to be formatted.
* @return a Iso8601_Rule that can format TimeZone String of length {@code tokenLen}. If no such
* @return an Iso8601_Rule that can format TimeZone String of length {@code tokenLen}. If no such
* rule exists, an IllegalArgumentException will be thrown.
*/
static Iso8601_Rule getRule(final int tokenLen) {

View File

@ -193,7 +193,7 @@ abstract class FormatCache<F extends Format> {
}
/**
* Helper class to hold multi-part Map keys as arrays.
* Helper class to hold multipart Map keys as arrays.
*/
private static final class ArrayKey {

View File

@ -437,7 +437,7 @@ public class ObjectUtilsTest extends AbstractLangTest {
@Test
public void testGetFirstNonNull() {
// first non null
// first non-null
assertEquals("", ObjectUtils.getFirstNonNull(() -> null, () -> ""));
// first encountered value is used
assertEquals("1", ObjectUtils.getFirstNonNull(() -> null, () -> "1", () -> "2", () -> null));

View File

@ -290,7 +290,7 @@ public class StringUtilsSubstringTest extends AbstractLangTest {
}
/**
* Tests the substringsBetween method that returns an String Array of substrings.
* Tests the substringsBetween method that returns a String Array of substrings.
*/
@Test
public void testSubstringsBetween_StringStringString() {

View File

@ -1723,7 +1723,7 @@ public class StringUtilsTest extends AbstractLangTest {
assertEquals(StringUtils.removeEndIgnoreCase("domain.com", ""), "domain.com", "removeEndIgnoreCase(\"domain.com\", \"\")");
assertEquals(StringUtils.removeEndIgnoreCase("domain.com", null), "domain.com", "removeEndIgnoreCase(\"domain.com\", null)");
// Case insensitive:
// Case-insensitive:
assertEquals(StringUtils.removeEndIgnoreCase("www.domain.com", ".COM"), "www.domain", "removeEndIgnoreCase(\"www.domain.com\", \".COM\")");
assertEquals(StringUtils.removeEndIgnoreCase("www.domain.COM", ".com"), "www.domain", "removeEndIgnoreCase(\"www.domain.COM\", \".com\")");
}
@ -1861,7 +1861,7 @@ public class StringUtilsTest extends AbstractLangTest {
assertEquals(StringUtils.removeStartIgnoreCase("domain.com", ""), "domain.com", "removeStartIgnoreCase(\"domain.com\", \"\")");
assertEquals(StringUtils.removeStartIgnoreCase("domain.com", null), "domain.com", "removeStartIgnoreCase(\"domain.com\", null)");
// Case insensitive:
// Case-insensitive:
assertEquals(StringUtils.removeStartIgnoreCase("www.domain.com", "WWW."), "domain.com", "removeStartIgnoreCase(\"www.domain.com\", \"WWW.\")");
}

View File

@ -342,7 +342,7 @@ public class EqualsBuilderTest extends AbstractLangTest {
*
* @param to a TestObject
* @param toBis a TestObject, equal to to and toTer
* @param toTer Left hand side, equal to to and toBis
* @param toTer left-hand side, equal to to and toBis
* @param to2 a different TestObject
* @param oToChange a TestObject that will be changed
* @param testTransients whether to test transient instance variables

View File

@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
/**
* Tests {@link org.apache.commons.lang3.builder.HashCodeBuilder} and
* {@link org.apache.commons.lang3.builder.EqualsBuilderTest} to insure that equal
* {@link org.apache.commons.lang3.builder.EqualsBuilderTest} to ensure that equal
* objects must have equal hash codes.
*/
public class HashCodeBuilderAndEqualsBuilderTest extends AbstractLangTest {

View File

@ -53,7 +53,7 @@ public class ExceptionUtilsTest extends AbstractLangTest {
/**
* Provides a method with a well known chained/nested exception
* name which matches the full signature (e.g. has a return value
* of {@code Throwable}.
* of {@code Throwable}).
*/
private static class ExceptionWithCause extends Exception {
private static final long serialVersionUID = 1L;
@ -82,7 +82,7 @@ public class ExceptionUtilsTest extends AbstractLangTest {
/**
* Provides a method with a well known chained/nested exception
* name which does not match the full signature (e.g. lacks a
* return value of {@code Throwable}.
* return value of {@code Throwable}).
*/
private static class ExceptionWithoutCause extends Exception {
private static final long serialVersionUID = 1L;

View File

@ -29,13 +29,13 @@ import org.apache.commons.lang3.ObjectUtils;
* This class provides some replacements for the corresponding methods in
* {@link java.util.Objects}. The replacements have the advantage, that they are properly
* annotated with {@link Nullable}, and/or {@link Nonnull}, so they let the
* compiler know, what their respective results are.
* compiler know what their respective results are.
*
* The various {@code requireNonNull} methods are particularly handy, when
* dealing with external code, that a) doesn't support the {@link Nonnull}
* annotation, or if you know for other reasons, that an object is non-null.
* Take for example, a {@link java.util.Map map}, that you have filled with
* non-null values. So, in your opinion, the following should be perfectably
* non-null values. So, in your opinion, the following should be perfectly
* valid code:
* <pre>
* final Map&lt;String,Object&gt; map = getMapOfNonNullValues();

View File

@ -1576,7 +1576,7 @@ public class NumberUtilsTest extends AbstractLangTest {
public void testToScaledBigDecimalBigDecimal() {
assertEquals(NumberUtils.toScaledBigDecimal(BigDecimal.valueOf(123.456)), BigDecimal.valueOf(123.46),
"toScaledBigDecimal(BigDecimal) 1 failed");
// Test RoudingMode.HALF_EVEN default rounding.
// Test RoundingMode.HALF_EVEN default rounding.
assertEquals(NumberUtils.toScaledBigDecimal(BigDecimal.valueOf(23.515)), BigDecimal.valueOf(23.52),
"toScaledBigDecimal(BigDecimal) 2 failed");
assertEquals(NumberUtils.toScaledBigDecimal(BigDecimal.valueOf(23.525)), BigDecimal.valueOf(23.52),
@ -1594,17 +1594,17 @@ public class NumberUtilsTest extends AbstractLangTest {
@Test
public void testToScaledBigDecimalBigDecimalIRM() {
assertEquals(NumberUtils.toScaledBigDecimal(BigDecimal.valueOf(123.456), 1, RoundingMode.CEILING),
BigDecimal.valueOf(123.5), "toScaledBigDecimal(BigDecimal, int, RoudingMode) 1 failed");
BigDecimal.valueOf(123.5), "toScaledBigDecimal(BigDecimal, int, RoundingMode) 1 failed");
assertEquals(NumberUtils.toScaledBigDecimal(BigDecimal.valueOf(23.5159), 3, RoundingMode.FLOOR),
BigDecimal.valueOf(23.515), "toScaledBigDecimal(BigDecimal, int, RoudingMode) 2 failed");
BigDecimal.valueOf(23.515), "toScaledBigDecimal(BigDecimal, int, RoundingMode) 2 failed");
assertEquals(NumberUtils.toScaledBigDecimal(BigDecimal.valueOf(23.525), 2, RoundingMode.HALF_UP),
BigDecimal.valueOf(23.53), "toScaledBigDecimal(BigDecimal, int, RoudingMode) 3 failed");
BigDecimal.valueOf(23.53), "toScaledBigDecimal(BigDecimal, int, RoundingMode) 3 failed");
assertEquals("23521.0000",
NumberUtils.toScaledBigDecimal(BigDecimal.valueOf(23.521), 4, RoundingMode.HALF_EVEN)
.multiply(BigDecimal.valueOf(1000)).toString(),
"toScaledBigDecimal(BigDecimal, int, RoudingMode) 4 failed");
"toScaledBigDecimal(BigDecimal, int, RoundingMode) 4 failed");
assertEquals(NumberUtils.toScaledBigDecimal((BigDecimal) null, 2, RoundingMode.HALF_UP), BigDecimal.ZERO,
"toScaledBigDecimal(BigDecimal, int, RoudingMode) 5 failed");
"toScaledBigDecimal(BigDecimal, int, RoundingMode) 5 failed");
}
/**
@ -1614,7 +1614,7 @@ public class NumberUtilsTest extends AbstractLangTest {
public void testToScaledBigDecimalDouble() {
assertEquals(NumberUtils.toScaledBigDecimal(Double.valueOf(123.456d)), BigDecimal.valueOf(123.46),
"toScaledBigDecimal(Double) 1 failed");
// Test RoudingMode.HALF_EVEN default rounding.
// Test RoundingMode.HALF_EVEN default rounding.
assertEquals(NumberUtils.toScaledBigDecimal(Double.valueOf(23.515d)), BigDecimal.valueOf(23.52),
"toScaledBigDecimal(Double) 2 failed");
assertEquals(NumberUtils.toScaledBigDecimal(Double.valueOf(23.525d)), BigDecimal.valueOf(23.52),
@ -1632,17 +1632,17 @@ public class NumberUtilsTest extends AbstractLangTest {
@Test
public void testToScaledBigDecimalDoubleIRM() {
assertEquals(NumberUtils.toScaledBigDecimal(Double.valueOf(123.456d), 1, RoundingMode.CEILING),
BigDecimal.valueOf(123.5), "toScaledBigDecimal(Double, int, RoudingMode) 1 failed");
BigDecimal.valueOf(123.5), "toScaledBigDecimal(Double, int, RoundingMode) 1 failed");
assertEquals(NumberUtils.toScaledBigDecimal(Double.valueOf(23.5159d), 3, RoundingMode.FLOOR),
BigDecimal.valueOf(23.515), "toScaledBigDecimal(Double, int, RoudingMode) 2 failed");
BigDecimal.valueOf(23.515), "toScaledBigDecimal(Double, int, RoundingMode) 2 failed");
assertEquals(NumberUtils.toScaledBigDecimal(Double.valueOf(23.525d), 2, RoundingMode.HALF_UP),
BigDecimal.valueOf(23.53), "toScaledBigDecimal(Double, int, RoudingMode) 3 failed");
BigDecimal.valueOf(23.53), "toScaledBigDecimal(Double, int, RoundingMode) 3 failed");
assertEquals("23521.0000",
NumberUtils.toScaledBigDecimal(Double.valueOf(23.521d), 4, RoundingMode.HALF_EVEN)
.multiply(BigDecimal.valueOf(1000)).toString(),
"toScaledBigDecimal(Double, int, RoudingMode) 4 failed");
"toScaledBigDecimal(Double, int, RoundingMode) 4 failed");
assertEquals(NumberUtils.toScaledBigDecimal((Double) null, 2, RoundingMode.HALF_UP), BigDecimal.ZERO,
"toScaledBigDecimal(Double, int, RoudingMode) 5 failed");
"toScaledBigDecimal(Double, int, RoundingMode) 5 failed");
}
/**
@ -1652,7 +1652,7 @@ public class NumberUtilsTest extends AbstractLangTest {
public void testToScaledBigDecimalFloat() {
assertEquals(NumberUtils.toScaledBigDecimal(Float.valueOf(123.456f)), BigDecimal.valueOf(123.46),
"toScaledBigDecimal(Float) 1 failed");
// Test RoudingMode.HALF_EVEN default rounding.
// Test RoundingMode.HALF_EVEN default rounding.
assertEquals(NumberUtils.toScaledBigDecimal(Float.valueOf(23.515f)), BigDecimal.valueOf(23.51),
"toScaledBigDecimal(Float) 2 failed");
// Note. NumberUtils.toScaledBigDecimal(Float.valueOf(23.515f)).equals(BigDecimal.valueOf(23.51))
@ -1672,16 +1672,16 @@ public class NumberUtilsTest extends AbstractLangTest {
@Test
public void testToScaledBigDecimalFloatIRM() {
assertEquals(NumberUtils.toScaledBigDecimal(Float.valueOf(123.456f), 1, RoundingMode.CEILING),
BigDecimal.valueOf(123.5), "toScaledBigDecimal(Float, int, RoudingMode) 1 failed");
BigDecimal.valueOf(123.5), "toScaledBigDecimal(Float, int, RoundingMode) 1 failed");
assertEquals(NumberUtils.toScaledBigDecimal(Float.valueOf(23.5159f), 3, RoundingMode.FLOOR),
BigDecimal.valueOf(23.515), "toScaledBigDecimal(Float, int, RoudingMode) 2 failed");
BigDecimal.valueOf(23.515), "toScaledBigDecimal(Float, int, RoundingMode) 2 failed");
// The following happens due to roundoff error. We're ok with this.
assertEquals(NumberUtils.toScaledBigDecimal(Float.valueOf(23.525f), 2, RoundingMode.HALF_UP),
BigDecimal.valueOf(23.52), "toScaledBigDecimal(Float, int, RoudingMode) 3 failed");
BigDecimal.valueOf(23.52), "toScaledBigDecimal(Float, int, RoundingMode) 3 failed");
assertEquals("23521.0000", NumberUtils.toScaledBigDecimal(Float.valueOf(23.521f), 4, RoundingMode.HALF_EVEN)
.multiply(BigDecimal.valueOf(1000)).toString(), "toScaledBigDecimal(Float, int, RoudingMode) 4 failed");
.multiply(BigDecimal.valueOf(1000)).toString(), "toScaledBigDecimal(Float, int, RoundingMode) 4 failed");
assertEquals(NumberUtils.toScaledBigDecimal((Float) null, 2, RoundingMode.HALF_UP), BigDecimal.ZERO,
"toScaledBigDecimal(Float, int, RoudingMode) 5 failed");
"toScaledBigDecimal(Float, int, RoundingMode) 5 failed");
}
/**
@ -1691,7 +1691,7 @@ public class NumberUtilsTest extends AbstractLangTest {
public void testToScaledBigDecimalString() {
assertEquals(NumberUtils.toScaledBigDecimal("123.456"), BigDecimal.valueOf(123.46),
"toScaledBigDecimal(String) 1 failed");
// Test RoudingMode.HALF_EVEN default rounding.
// Test RoundingMode.HALF_EVEN default rounding.
assertEquals(NumberUtils.toScaledBigDecimal("23.515"), BigDecimal.valueOf(23.52),
"toScaledBigDecimal(String) 2 failed");
assertEquals(NumberUtils.toScaledBigDecimal("23.525"), BigDecimal.valueOf(23.52),
@ -1708,17 +1708,17 @@ public class NumberUtilsTest extends AbstractLangTest {
@Test
public void testToScaledBigDecimalStringIRM() {
assertEquals(NumberUtils.toScaledBigDecimal("123.456", 1, RoundingMode.CEILING), BigDecimal.valueOf(123.5),
"toScaledBigDecimal(String, int, RoudingMode) 1 failed");
"toScaledBigDecimal(String, int, RoundingMode) 1 failed");
assertEquals(NumberUtils.toScaledBigDecimal("23.5159", 3, RoundingMode.FLOOR), BigDecimal.valueOf(23.515),
"toScaledBigDecimal(String, int, RoudingMode) 2 failed");
"toScaledBigDecimal(String, int, RoundingMode) 2 failed");
assertEquals(NumberUtils.toScaledBigDecimal("23.525", 2, RoundingMode.HALF_UP), BigDecimal.valueOf(23.53),
"toScaledBigDecimal(String, int, RoudingMode) 3 failed");
"toScaledBigDecimal(String, int, RoundingMode) 3 failed");
assertEquals(
"23521.0000", NumberUtils.toScaledBigDecimal("23.521", 4, RoundingMode.HALF_EVEN)
.multiply(BigDecimal.valueOf(1000)).toString(),
"toScaledBigDecimal(String, int, RoudingMode) 4 failed");
"toScaledBigDecimal(String, int, RoundingMode) 4 failed");
assertEquals(NumberUtils.toScaledBigDecimal((String) null, 2, RoundingMode.HALF_UP), BigDecimal.ZERO,
"toScaledBigDecimal(String, int, RoudingMode) 5 failed");
"toScaledBigDecimal(String, int, RoundingMode) 5 failed");
}
/**

View File

@ -203,7 +203,7 @@ public class ExtendedMessageFormatTest extends AbstractLangTest {
// }
/**
* Test the built in choice format.
* Test the built-in choice format.
*/
@Test
public void testBuiltInChoiceFormat() {
@ -223,7 +223,7 @@ public class ExtendedMessageFormatTest extends AbstractLangTest {
}
/**
* Test the built in date/time formats
* Test the built-in date/time formats
*/
@Test
public void testBuiltInDateTimeFormat() {
@ -273,7 +273,7 @@ public class ExtendedMessageFormatTest extends AbstractLangTest {
}
/**
* Test the built in number formats.
* Test the built-in number formats.
*/
@Test
public void testBuiltInNumberFormat() {
@ -330,7 +330,7 @@ public class ExtendedMessageFormatTest extends AbstractLangTest {
}
/**
* Test a built in format for the specified Locales, plus {@code null} Locale.
* Test a built-in format for the specified Locales, plus {@code null} Locale.
* @param pattern MessageFormat pattern
* @param args MessageFormat arguments
* @param locales to test
@ -340,7 +340,7 @@ public class ExtendedMessageFormatTest extends AbstractLangTest {
}
/**
* Test a built in format for the specified Locales, plus {@code null} Locale.
* Test a built-in format for the specified Locales, plus {@code null} Locale.
* @param pattern MessageFormat pattern
* @param fmtRegistry FormatFactory registry to use
* @param args MessageFormat arguments

View File

@ -69,7 +69,7 @@ public class DateUtilsTest extends AbstractLangTest {
assertWeekIterator(it, start, end);
}
/**
* This checks that this is a 7 divisble iterator of Calendar objects
* This checks that this is a 7 divisible iterator of Calendar objects
* that are dates (no time), and exactly 1 day spaced after each other
* (in addition to the proper start and stop dates)
*/

View File

@ -663,10 +663,10 @@ public class FastDateParserTest extends AbstractLangTest {
testSdfAndFdp(dpProvider, "''''yyyyMMdd'A''B'HHmmssSSS''", "''20030210A'B153320989'", false); // OK
testSdfAndFdp(dpProvider, "'$\\Ed'", "$\\Ed", false); // OK
// quoted charaters are case sensitive
// quoted characters are case-sensitive
testSdfAndFdp(dpProvider, "'QED'", "QED", false);
testSdfAndFdp(dpProvider, "'QED'", "qed", true);
// case sensitive after insensitive Month field
// case-sensitive after insensitive Month field
testSdfAndFdp(dpProvider, "yyyy-MM-dd 'QED'", "2003-02-10 QED", false);
testSdfAndFdp(dpProvider, "yyyy-MM-dd 'QED'", "2003-02-10 qed", true);
}
@ -713,7 +713,7 @@ public class FastDateParserTest extends AbstractLangTest {
sdf.set2DigitYearStart(csDate);
}
final String fmt = sdf.format(inDate);
// System.out.printf("[Java %s] Date: '%s' formated with '%s' -> '%s'%n", SystemUtils.JAVA_RUNTIME_VERSION, inDate,
// System.out.printf("[Java %s] Date: '%s' formatted with '%s' -> '%s'%n", SystemUtils.JAVA_RUNTIME_VERSION, inDate,
// formatStr, fmt);
try {
final Date out = dateParser.parse(fmt);