Fix formatting
This commit is contained in:
parent
f53de756a8
commit
0cfc31b987
|
@ -67,12 +67,12 @@ import org.apache.commons.lang3.Functions.FailablePredicate;
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class Streams {
|
public class Streams {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A reduced, and simplified version of a {@link Stream} with
|
* A reduced, and simplified version of a {@link Stream} with
|
||||||
* failable method signatures.
|
* failable method signatures.
|
||||||
* @param <O> The streams element type.
|
* @param <O> The streams element type.
|
||||||
* @deprecated Use {@link org.apache.commons.lang3.stream.Streams.FailableStream}.
|
* @deprecated Use {@link org.apache.commons.lang3.stream.Streams.FailableStream}.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static class FailableStream<O extends Object> {
|
public static class FailableStream<O extends Object> {
|
||||||
|
|
||||||
|
|
|
@ -6923,32 +6923,32 @@ public class StringUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Case insensitively replaces all occurrences of a String within another String.</p>
|
* <p>Case insensitively replaces all occurrences of a String within another String.</p>
|
||||||
*
|
*
|
||||||
* <p>A {@code null} reference passed to this method is a no-op.</p>
|
* <p>A {@code null} reference passed to this method is a no-op.</p>
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* StringUtils.replaceIgnoreCase(null, *, *) = null
|
* StringUtils.replaceIgnoreCase(null, *, *) = null
|
||||||
* StringUtils.replaceIgnoreCase("", *, *) = ""
|
* StringUtils.replaceIgnoreCase("", *, *) = ""
|
||||||
* StringUtils.replaceIgnoreCase("any", null, *) = "any"
|
* StringUtils.replaceIgnoreCase("any", null, *) = "any"
|
||||||
* StringUtils.replaceIgnoreCase("any", *, null) = "any"
|
* StringUtils.replaceIgnoreCase("any", *, null) = "any"
|
||||||
* StringUtils.replaceIgnoreCase("any", "", *) = "any"
|
* StringUtils.replaceIgnoreCase("any", "", *) = "any"
|
||||||
* StringUtils.replaceIgnoreCase("aba", "a", null) = "aba"
|
* StringUtils.replaceIgnoreCase("aba", "a", null) = "aba"
|
||||||
* StringUtils.replaceIgnoreCase("abA", "A", "") = "b"
|
* StringUtils.replaceIgnoreCase("abA", "A", "") = "b"
|
||||||
* StringUtils.replaceIgnoreCase("aba", "A", "z") = "zbz"
|
* StringUtils.replaceIgnoreCase("aba", "A", "z") = "zbz"
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @see #replaceIgnoreCase(String text, String searchString, String replacement, int max)
|
* @see #replaceIgnoreCase(String text, String searchString, String replacement, int max)
|
||||||
* @param text text to search and replace in, may be null
|
* @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 replacement the String to replace it with, may be null
|
||||||
* @return the text with any replacements processed,
|
* @return the text with any replacements processed,
|
||||||
* {@code null} if null String input
|
* {@code null} if null String input
|
||||||
* @since 3.5
|
* @since 3.5
|
||||||
*/
|
*/
|
||||||
public static String replaceIgnoreCase(final String text, final String searchString, final String replacement) {
|
public static String replaceIgnoreCase(final String text, final String searchString, final String replacement) {
|
||||||
return replaceIgnoreCase(text, searchString, replacement, -1);
|
return replaceIgnoreCase(text, searchString, replacement, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Case insensitively replaces a String with another String inside a larger String,
|
* <p>Case insensitively replaces a String with another String inside a larger String,
|
||||||
|
|
|
@ -1000,18 +1000,18 @@ public class Validate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate that the specified primitive value falls between the two
|
* Validate that the specified primitive value falls between the two
|
||||||
* inclusive values specified; otherwise, throws an exception.
|
* inclusive values specified; otherwise, throws an exception.
|
||||||
*
|
*
|
||||||
* <pre>Validate.inclusiveBetween(0, 2, 1);</pre>
|
* <pre>Validate.inclusiveBetween(0, 2, 1);</pre>
|
||||||
*
|
*
|
||||||
* @param start the inclusive start value
|
* @param start the inclusive start value
|
||||||
* @param end the inclusive end value
|
* @param end the inclusive end value
|
||||||
* @param value the value to validate
|
* @param value the value to validate
|
||||||
* @throws IllegalArgumentException if the value falls outside the boundaries (inclusive)
|
* @throws IllegalArgumentException if the value falls outside the boundaries (inclusive)
|
||||||
*
|
*
|
||||||
* @since 3.3
|
* @since 3.3
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("boxing")
|
@SuppressWarnings("boxing")
|
||||||
public static void inclusiveBetween(final long start, final long end, final long value) {
|
public static void inclusiveBetween(final long start, final long end, final long value) {
|
||||||
// TODO when breaking BC, consider returning value
|
// TODO when breaking BC, consider returning value
|
||||||
|
@ -1021,21 +1021,21 @@ public class Validate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate that the specified primitive value falls between the two
|
* Validate that the specified primitive value falls between the two
|
||||||
* inclusive values specified; otherwise, throws an exception with the
|
* inclusive values specified; otherwise, throws an exception with the
|
||||||
* specified message.
|
* specified message.
|
||||||
*
|
*
|
||||||
* <pre>Validate.inclusiveBetween(0, 2, 1, "Not in range");</pre>
|
* <pre>Validate.inclusiveBetween(0, 2, 1, "Not in range");</pre>
|
||||||
*
|
*
|
||||||
* @param start the inclusive start value
|
* @param start the inclusive start value
|
||||||
* @param end the inclusive end value
|
* @param end the inclusive end value
|
||||||
* @param value the value to validate
|
* @param value the value to validate
|
||||||
* @param message the exception message if invalid, not null
|
* @param message the exception message if invalid, not null
|
||||||
*
|
*
|
||||||
* @throws IllegalArgumentException if the value falls outside the boundaries
|
* @throws IllegalArgumentException if the value falls outside the boundaries
|
||||||
*
|
*
|
||||||
* @since 3.3
|
* @since 3.3
|
||||||
*/
|
*/
|
||||||
public static void inclusiveBetween(final long start, final long end, final long value, final String message) {
|
public static void inclusiveBetween(final long start, final long end, final long value, final String message) {
|
||||||
// TODO when breaking BC, consider returning value
|
// TODO when breaking BC, consider returning value
|
||||||
if (value < start || value > end) {
|
if (value < start || value > end) {
|
||||||
|
@ -1044,18 +1044,18 @@ public class Validate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate that the specified primitive value falls between the two
|
* Validate that the specified primitive value falls between the two
|
||||||
* inclusive values specified; otherwise, throws an exception.
|
* inclusive values specified; otherwise, throws an exception.
|
||||||
*
|
*
|
||||||
* <pre>Validate.inclusiveBetween(0.1, 2.1, 1.1);</pre>
|
* <pre>Validate.inclusiveBetween(0.1, 2.1, 1.1);</pre>
|
||||||
*
|
*
|
||||||
* @param start the inclusive start value
|
* @param start the inclusive start value
|
||||||
* @param end the inclusive end value
|
* @param end the inclusive end value
|
||||||
* @param value the value to validate
|
* @param value the value to validate
|
||||||
* @throws IllegalArgumentException if the value falls outside the boundaries (inclusive)
|
* @throws IllegalArgumentException if the value falls outside the boundaries (inclusive)
|
||||||
*
|
*
|
||||||
* @since 3.3
|
* @since 3.3
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("boxing")
|
@SuppressWarnings("boxing")
|
||||||
public static void inclusiveBetween(final double start, final double end, final double value) {
|
public static void inclusiveBetween(final double start, final double end, final double value) {
|
||||||
// TODO when breaking BC, consider returning value
|
// TODO when breaking BC, consider returning value
|
||||||
|
@ -1065,21 +1065,21 @@ public class Validate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate that the specified primitive value falls between the two
|
* Validate that the specified primitive value falls between the two
|
||||||
* inclusive values specified; otherwise, throws an exception with the
|
* inclusive values specified; otherwise, throws an exception with the
|
||||||
* specified message.
|
* specified message.
|
||||||
*
|
*
|
||||||
* <pre>Validate.inclusiveBetween(0.1, 2.1, 1.1, "Not in range");</pre>
|
* <pre>Validate.inclusiveBetween(0.1, 2.1, 1.1, "Not in range");</pre>
|
||||||
*
|
*
|
||||||
* @param start the inclusive start value
|
* @param start the inclusive start value
|
||||||
* @param end the inclusive end value
|
* @param end the inclusive end value
|
||||||
* @param value the value to validate
|
* @param value the value to validate
|
||||||
* @param message the exception message if invalid, not null
|
* @param message the exception message if invalid, not null
|
||||||
*
|
*
|
||||||
* @throws IllegalArgumentException if the value falls outside the boundaries
|
* @throws IllegalArgumentException if the value falls outside the boundaries
|
||||||
*
|
*
|
||||||
* @since 3.3
|
* @since 3.3
|
||||||
*/
|
*/
|
||||||
public static void inclusiveBetween(final double start, final double end, final double value, final String message) {
|
public static void inclusiveBetween(final double start, final double end, final double value, final String message) {
|
||||||
// TODO when breaking BC, consider returning value
|
// TODO when breaking BC, consider returning value
|
||||||
if (value < start || value > end) {
|
if (value < start || value > end) {
|
||||||
|
@ -1138,18 +1138,18 @@ public class Validate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate that the specified primitive value falls between the two
|
* Validate that the specified primitive value falls between the two
|
||||||
* exclusive values specified; otherwise, throws an exception.
|
* exclusive values specified; otherwise, throws an exception.
|
||||||
*
|
*
|
||||||
* <pre>Validate.exclusiveBetween(0, 2, 1);</pre>
|
* <pre>Validate.exclusiveBetween(0, 2, 1);</pre>
|
||||||
*
|
*
|
||||||
* @param start the exclusive start value
|
* @param start the exclusive start value
|
||||||
* @param end the exclusive end value
|
* @param end the exclusive end value
|
||||||
* @param value the value to validate
|
* @param value the value to validate
|
||||||
* @throws IllegalArgumentException if the value falls out of the boundaries
|
* @throws IllegalArgumentException if the value falls out of the boundaries
|
||||||
*
|
*
|
||||||
* @since 3.3
|
* @since 3.3
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("boxing")
|
@SuppressWarnings("boxing")
|
||||||
public static void exclusiveBetween(final long start, final long end, final long value) {
|
public static void exclusiveBetween(final long start, final long end, final long value) {
|
||||||
// TODO when breaking BC, consider returning value
|
// TODO when breaking BC, consider returning value
|
||||||
|
@ -1159,21 +1159,21 @@ public class Validate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate that the specified primitive value falls between the two
|
* Validate that the specified primitive value falls between the two
|
||||||
* exclusive values specified; otherwise, throws an exception with the
|
* exclusive values specified; otherwise, throws an exception with the
|
||||||
* specified message.
|
* specified message.
|
||||||
*
|
*
|
||||||
* <pre>Validate.exclusiveBetween(0, 2, 1, "Not in range");</pre>
|
* <pre>Validate.exclusiveBetween(0, 2, 1, "Not in range");</pre>
|
||||||
*
|
*
|
||||||
* @param start the exclusive start value
|
* @param start the exclusive start value
|
||||||
* @param end the exclusive end value
|
* @param end the exclusive end value
|
||||||
* @param value the value to validate
|
* @param value the value to validate
|
||||||
* @param message the exception message if invalid, not null
|
* @param message the exception message if invalid, not null
|
||||||
*
|
*
|
||||||
* @throws IllegalArgumentException if the value falls outside the boundaries
|
* @throws IllegalArgumentException if the value falls outside the boundaries
|
||||||
*
|
*
|
||||||
* @since 3.3
|
* @since 3.3
|
||||||
*/
|
*/
|
||||||
public static void exclusiveBetween(final long start, final long end, final long value, final String message) {
|
public static void exclusiveBetween(final long start, final long end, final long value, final String message) {
|
||||||
// TODO when breaking BC, consider returning value
|
// TODO when breaking BC, consider returning value
|
||||||
if (value <= start || value >= end) {
|
if (value <= start || value >= end) {
|
||||||
|
@ -1182,18 +1182,18 @@ public class Validate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate that the specified primitive value falls between the two
|
* Validate that the specified primitive value falls between the two
|
||||||
* exclusive values specified; otherwise, throws an exception.
|
* exclusive values specified; otherwise, throws an exception.
|
||||||
*
|
*
|
||||||
* <pre>Validate.exclusiveBetween(0.1, 2.1, 1.1);</pre>
|
* <pre>Validate.exclusiveBetween(0.1, 2.1, 1.1);</pre>
|
||||||
*
|
*
|
||||||
* @param start the exclusive start value
|
* @param start the exclusive start value
|
||||||
* @param end the exclusive end value
|
* @param end the exclusive end value
|
||||||
* @param value the value to validate
|
* @param value the value to validate
|
||||||
* @throws IllegalArgumentException if the value falls out of the boundaries
|
* @throws IllegalArgumentException if the value falls out of the boundaries
|
||||||
*
|
*
|
||||||
* @since 3.3
|
* @since 3.3
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("boxing")
|
@SuppressWarnings("boxing")
|
||||||
public static void exclusiveBetween(final double start, final double end, final double value) {
|
public static void exclusiveBetween(final double start, final double end, final double value) {
|
||||||
// TODO when breaking BC, consider returning value
|
// TODO when breaking BC, consider returning value
|
||||||
|
@ -1203,21 +1203,21 @@ public class Validate {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate that the specified primitive value falls between the two
|
* Validate that the specified primitive value falls between the two
|
||||||
* exclusive values specified; otherwise, throws an exception with the
|
* exclusive values specified; otherwise, throws an exception with the
|
||||||
* specified message.
|
* specified message.
|
||||||
*
|
*
|
||||||
* <pre>Validate.exclusiveBetween(0.1, 2.1, 1.1, "Not in range");</pre>
|
* <pre>Validate.exclusiveBetween(0.1, 2.1, 1.1, "Not in range");</pre>
|
||||||
*
|
*
|
||||||
* @param start the exclusive start value
|
* @param start the exclusive start value
|
||||||
* @param end the exclusive end value
|
* @param end the exclusive end value
|
||||||
* @param value the value to validate
|
* @param value the value to validate
|
||||||
* @param message the exception message if invalid, not null
|
* @param message the exception message if invalid, not null
|
||||||
*
|
*
|
||||||
* @throws IllegalArgumentException if the value falls outside the boundaries
|
* @throws IllegalArgumentException if the value falls outside the boundaries
|
||||||
*
|
*
|
||||||
* @since 3.3
|
* @since 3.3
|
||||||
*/
|
*/
|
||||||
public static void exclusiveBetween(final double start, final double end, final double value, final String message) {
|
public static void exclusiveBetween(final double start, final double end, final double value, final String message) {
|
||||||
// TODO when breaking BC, consider returning value
|
// TODO when breaking BC, consider returning value
|
||||||
if (value <= start || value >= end) {
|
if (value <= start || value >= end) {
|
||||||
|
|
|
@ -644,8 +644,8 @@ public class NumberUtils {
|
||||||
* <p>If a type specifier is not found, it will check for a decimal point
|
* <p>If a type specifier is not found, it will check for a decimal point
|
||||||
* and then try successively larger types from {@code Integer} to
|
* and then try successively larger types from {@code Integer} to
|
||||||
* {@code BigInteger} and from {@code Float} to
|
* {@code BigInteger} and from {@code Float} to
|
||||||
* {@code BigDecimal}.</p>
|
* {@code BigDecimal}.</p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* Integral values with a leading {@code 0} will be interpreted as octal; the returned number will
|
* Integral values with a leading {@code 0} will be interpreted as octal; the returned number will
|
||||||
* be Integer, Long or BigDecimal as appropriate.
|
* be Integer, Long or BigDecimal as appropriate.
|
||||||
|
|
Loading…
Reference in New Issue