| Modifier and Type | Field and Description |
|---|---|
| public static final NormalizedString[] | |
| public static final String[] | EMPTY_STRING_ARRAY
An empty String array. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: the updated string with any line separators replaced by visible character sequences.the string to have its line separators displayed str, boolean flag indicating whether the original `\r` or `\n` characters should be kept in the string.
if addNewLine)true, `\r` will be replaced by `[cr]\r` for example.Displays line separators in a string by replacing all instances of `\r` and `\n` with `[cr]` and `[lf]`. |
| public static < the type of elements held in the given array. T> T[] | Returns: all duplicate values found in the given array, or empty array if no duplicates, ornull if the input is null.the search array array)Identifies duplicate values in a given array and returns them |
| public static Object[] | Returns: the elements not found in the array.An array with elements array, Collection<?> the elements to be found elements)Searches for elements in a given array and returns the elements not found. |
| public static Object[] | Returns: the elements not found in the array.An array with elements array, Object[] the elements to be found elements)Searches for elements in a given array and returns the elements not found. |
| public static int[] | |
| public static int | Returns: the index of the given element in the array, or -1 if the element could not be found.the element array array, NormalizedString the element to be looked for in the array. element, FieldSelector a field selector that indicates which elements of the given array are selected. fieldSelector)Returns the index of a header, when headers are selected using a |
| public static int | |
| public static int | Returns: the index of the given character in the array, or -1 if the character could not be found.the character array array, char the character to be looked for in the array. element, int the starting position of the array from where to start the search from)Returns the index of a character in a given array. |
| private static int | Returns: the index of the given element in the array, or -1 if the element could not be found.the element array array, Object the element to be looked for in the array. element, int the starting position of the array from where to start the search from)Returns the index of an element in a given array. |
| public static Reader | Returns: ajava. wrapping the given input streamthe input stream input)Creates a |
| public static Reader | Returns: ajava. wrapping the given input streamthe input stream input, String the encoding to use when reading from the input stream encoding)Creates a |
| public static Reader | Returns: ajava. wrapping the given input streamthe input stream input, Charset the encoding to use when reading from the input stream encoding)Creates a |
| public static Reader | Returns: ajava. for reading the given filethe file to be read file)Creates a |
| public static Reader | Returns: ajava. for reading the given filethe file to be read file, String the encoding to be used when reading from the file encoding)Creates a |
| public static Reader | Returns: ajava. for reading the given filethe file to be read file, Charset the encoding to be used when reading from the file encoding)Creates a |
| public static Writer | Returns: java. wrapping the given output streamthe output stream output)Creates a |
| public static Writer | Returns: java. wrapping the given output streamthe output stream output, String the encoding to use when writing to the output stream encoding)Creates a |
| public static Writer | Returns: java. wrapping the given output streamthe output stream output, Charset the encoding to use when writing to the output stream encoding)Creates a |
| public static Writer | Returns: java. for the given filethe file to be written file)Creates a |
| public static Writer | Returns: java. for the given filethe file to be written file, String the encoding to use when writing to the file encoding)Creates a |
| public static Writer | Returns: java. for the given filethe file to be written file, Charset the encoding to use when writing to the file encoding)Creates a |
| public static < Type of arguments to be validated T> void | |
| public static < Type of arguments to be validated T> void | |
| public static int[] | Returns: an updated array that does not contain the given element anywhere, or the original array if the element has not been found.the array to be checked array, int the element to be removed e)Removes all instances of a given element from an int array. |
| public static String | Returns: the restricted content.the maximum length to be displayed. If length, CharSequence 0, the "<omitted>" string will be returned.the content whose length should be restricted. content)Restricts the length of a given content. |
| public static String | Returns: the restricted content.the maximum length to be displayed. If length, Object 0, the "<omitted>" string will be returned.the content whose length should be restricted. content)Restricts the length of a given content. |
| private static <T extends Exception> void | |
| public static void | throwUnchecked(Throwable
the (potentially checked) exception to the thrown. error)Allows rethrowing a checked exception instead of wrapping it into a runtime exception. |
| public static String[] | toArray(List<Enum<E extends Enum<E>>>
a list of enumerations to convert enums)Converts a list of enumerations to an array of their |
| public static byte[] | Returns: the resulting byte array.the integers to be cast to by ints)Converts a sequence of int numbers into a byte array. |
| public static char[] | Returns: a primitivechar array with the unboxed character values.a collection of (boxed) characters. characters)Converts any collection of |
| public static int[] | Returns: a primitiveint array with the unboxed integer values.a collection of (boxed) integers. ints)Converts any collection of |
| public static String | Returns: the trimmed string.the content to trim input, boolean flag to indicate whether spaces on the left side of the string should be removed. left, boolean flag to indicate whether spaces on the right side of the string should be removed. right)Removes surrounding spaces from a given |
| EMPTY_NORMALIZED_STRING_ARRAY | back to summary |
|---|---|
| public static final NormalizedString[] EMPTY_NORMALIZED_STRING_ARRAY | |
| EMPTY_STRING_ARRAY | back to summary |
|---|---|
| public static final String[] EMPTY_STRING_ARRAY An empty String array. | |
| ArgumentUtils | back to summary |
|---|---|
| public ArgumentUtils() | |
| displayLineSeparators | back to summary |
|---|---|
| public static String displayLineSeparators(String str, boolean addNewLine) Displays line separators in a string by replacing all instances of `\r` and `\n` with `[cr]` and `[lf]`. If `\r` is followed by `\n` or vice versa, then `[crlf]` or `[lfcr]` will be printed.
| |
| findDuplicates | back to summary |
|---|---|
| public static <T> T[] findDuplicates(T[] array) Identifies duplicate values in a given array and returns them
| |
| findMissingElements | back to summary |
|---|---|
| public static Object[] findMissingElements(Object[] array, Collection<?> elements) Searches for elements in a given array and returns the elements not found.
| |
| findMissingElements | back to summary |
|---|---|
| public static Object[] findMissingElements(Object[] array, Object[] elements) Searches for elements in a given array and returns the elements not found. | |
| indexesOf | back to summary |
|---|---|
| public static int[] indexesOf(Object[] array, Object element) Returns the indexes of an element in a given array. | |
| indexOf | back to summary |
|---|---|
| public static int indexOf(NormalizedString[] array, NormalizedString element, FieldSelector fieldSelector) Returns the index of a header, when headers are selected using a
| |
| indexOf | back to summary |
|---|---|
| public static int indexOf(Object[] array, Object element) Returns the index of an element in a given array. | |
| indexOf | back to summary |
|---|---|
| public static int indexOf(char[] array, char element, int from) Returns the index of a character in a given array.
| |
| indexOf | back to summary |
|---|---|
| private static int indexOf(Object[] array, Object element, int from) Returns the index of an element in a given array. | |
| newReader | back to summary |
|---|---|
| public static Reader newReader(InputStream input) Creates a
| |
| newReader | back to summary |
|---|---|
| public static Reader newReader(InputStream input, String encoding) Creates a
| |
| newReader | back to summary |
|---|---|
| public static Reader newReader(InputStream input, Charset encoding) Creates a
| |
| newReader | back to summary |
|---|---|
| public static Reader newReader(File file) Creates a
| |
| newReader | back to summary |
|---|---|
| public static Reader newReader(File file, String encoding) Creates a
| |
| newReader | back to summary |
|---|---|
| public static Reader newReader(File file, Charset encoding) Creates a
| |
| newWriter | back to summary |
|---|---|
| public static Writer newWriter(OutputStream output) Creates a
| |
| newWriter | back to summary |
|---|---|
| public static Writer newWriter(OutputStream output, String encoding) Creates a
| |
| newWriter | back to summary |
|---|---|
| public static Writer newWriter(OutputStream output, Charset encoding) Creates a
| |
| newWriter | back to summary |
|---|---|
| public static Writer newWriter(File file) Creates a
| |
| newWriter | back to summary |
|---|---|
| public static Writer newWriter(File file, String encoding) Creates a
| |
| newWriter | back to summary |
|---|---|
| public static Writer newWriter(File file, Charset encoding) Creates a
| |
| noNulls | back to summary |
|---|---|
| public static <T> void noNulls(String argDescription, T... args) Throws an IllegalArgumentException if the given array is null,empty, or contains null values
| |
| notEmpty | back to summary |
|---|---|
| public static <T> void notEmpty(String argDescription, T... args) Throws an IllegalArgumentException if the given array is null or empty.
| |
| removeAll | back to summary |
|---|---|
| public static int[] removeAll(int[] array, int e) Removes all instances of a given element from an int array.
| |
| restrictContent | back to summary |
|---|---|
| public static String restrictContent(int length, CharSequence content) Restricts the length of a given content.
| |
| restrictContent | back to summary |
|---|---|
| public static String restrictContent(int length, Object content) Restricts the length of a given content. | |
| throwsUnchecked | back to summary |
|---|---|
| private static <T extends Exception> void throwsUnchecked(Throwable toThrow) throws Throwable-:T | |
| throwUnchecked | back to summary |
|---|---|
| public static void throwUnchecked(Throwable error) Allows rethrowing a checked exception instead of wrapping it into a runtime exception. For internal use only as this generally causes more trouble than it solves (your exception-specific catch statement may not catch this error - make sure you are catching a Throwable)
| |
| toArray | back to summary |
|---|---|
| public static String[] toArray(List<Enum<E extends Enum<E>>> enums) Converts a list of enumerations to an array of their
| |
| toByteArray | back to summary |
|---|---|
| public static byte[] toByteArray(int... ints) Converts a sequence of int numbers into a byte array.
| |
| toCharArray | back to summary |
|---|---|
| public static char[] toCharArray(Collection<Character> characters) Converts any collection of
| |
| toIntArray | back to summary |
|---|---|
| public static int[] toIntArray(Collection<Integer> ints) Converts any collection of
| |
| trim | back to summary |
|---|---|
| public static String trim(String input, boolean left, boolean right) Removes surrounding spaces from a given | |