Index

A B C D E F G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

A

abs(T) - Static method in class org.klojang.util.MathMethods
Returns the absolute value of an arbitrary type of Number.
add(int) - Method in class org.klojang.util.collection.IntArrayList
 
add(int) - Method in interface org.klojang.util.collection.IntList
Appends the specified integer.
add(int, int) - Method in class org.klojang.util.collection.IntArrayList
 
add(int, int) - Method in interface org.klojang.util.collection.IntList
Inserts the specified value at the specified index, right-shifting all elements at, and following that the index.
ADD - Enum constant in enum class org.klojang.util.ResizeMethod
Increase the capacity by a fixed amount each time the buffer reaches full capacity.
addAll(int[]) - Method in class org.klojang.util.collection.IntArrayList
 
addAll(int[]) - Method in interface org.klojang.util.collection.IntList
Appends the specified values.
addAll(int, int[]) - Method in class org.klojang.util.collection.IntArrayList
 
addAll(int, int[]) - Method in interface org.klojang.util.collection.IntList
Inserts the specified int array into this list at the specified index, right-shifting the elements at, and following the index.
addAll(int, IntList) - Method in class org.klojang.util.collection.IntArrayList
 
addAll(int, IntList) - Method in interface org.klojang.util.collection.IntList
Inserts the values in the specified IntList into this list.
addAll(IntList) - Method in class org.klojang.util.collection.IntArrayList
 
addAll(IntList) - Method in interface org.klojang.util.collection.IntList
Appends the values in the specified IntList to this list.
AnyTuple2<T,U> - Record Class in org.klojang.util
Generic 2-tuple of arbitrarily typed objects, both of which are allowed to be null.
AnyTuple2(T, U) - Constructor for record class org.klojang.util.AnyTuple2
Creates an instance of a AnyTuple2 record class.
append(StringBuilder, Object) - Static method in class org.klojang.util.StringMethods
Appends the specified value to the specified StringBuilder and returns the StringBuilder.
append(StringBuilder, Object, Object) - Static method in class org.klojang.util.StringMethods
Appends the specified values to the specified StringBuilder and returns the StringBuilder.
append(StringBuilder, Object, Object, Object) - Static method in class org.klojang.util.StringMethods
Appends the specified values to the specified StringBuilder and returns the StringBuilder.
append(StringBuilder, Object, Object, Object, Object) - Static method in class org.klojang.util.StringMethods
Appends the specified values to the specified StringBuilder and returns the StringBuilder.
append(StringBuilder, Object, Object, Object, Object, Object) - Static method in class org.klojang.util.StringMethods
Appends the specified values to the specified StringBuilder and returns the StringBuilder.
append(StringBuilder, Object, Object, Object, Object, Object, Object) - Static method in class org.klojang.util.StringMethods
Appends the specified values to the specified StringBuilder and returns the StringBuilder.
append(StringBuilder, Object, Object, Object, Object, Object, Object, Object) - Static method in class org.klojang.util.StringMethods
Appends the specified values to the specified StringBuilder and returns the StringBuilder.
append(StringBuilder, Object, Object, Object, Object, Object, Object, Object, Object) - Static method in class org.klojang.util.StringMethods
Appends the specified values to the specified StringBuilder and returns the StringBuilder.
append(StringBuilder, Object, Object, Object, Object, Object, Object, Object, Object, Object) - Static method in class org.klojang.util.StringMethods
Appends the specified values to the specified StringBuilder and returns the StringBuilder.
append(StringBuilder, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object...) - Static method in class org.klojang.util.StringMethods
Appends the specified values to the specified StringBuilder and returns the StringBuilder.
append(String, String) - Static method in class org.klojang.util.IOMethods
Simple file-write method.
append(T[], T) - Static method in class org.klojang.util.ArrayMethods
Appends an element to an array.
append(T[], T, T, T...) - Static method in class org.klojang.util.ArrayMethods
Appends multiple elements to an array.
arrayClassName() - Method in record class org.klojang.util.ArrayType
Returns the fully-qualified class name of the array type encoded by this instance.
ArrayMethods - Class in org.klojang.util
Methods for working with arrays.
ArrayType - Record Class in org.klojang.util
Provides metadata about an array type.
ArrayType(Class<?>, int) - Constructor for record class org.klojang.util.ArrayType
Creates a new ArrayType instance.
asList(boolean[]) - Static method in class org.klojang.util.ArrayMethods
Converts a boolean array to a List<Boolean>.
asList(byte[]) - Static method in class org.klojang.util.ArrayMethods
Converts a byte array to a List<Byte>.
asList(char[]) - Static method in class org.klojang.util.ArrayMethods
Converts a char array to a List<Character>.
asList(double[]) - Static method in class org.klojang.util.ArrayMethods
Converts a double array to a List<Double>.
asList(float[]) - Static method in class org.klojang.util.ArrayMethods
Converts a float array to a List<Float>.
asList(int[]) - Static method in class org.klojang.util.ArrayMethods
Converts an int array to a List<Integer>.
asList(long[]) - Static method in class org.klojang.util.ArrayMethods
Converts a long array to a List<Long>.
asList(short[]) - Static method in class org.klojang.util.ArrayMethods
Converts a short array to a List<Short>.

B

baseType() - Method in record class org.klojang.util.ArrayType
Returns the value of the baseType record component.
box() - Method in record class org.klojang.util.ArrayType
Returns the Class object corresponding to an ArrayType equal to this ArrayType, but with the boxed version of the base type.
box(boolean[]) - Static method in class org.klojang.util.ArrayMethods
Converts a boolean array to a Boolean array.
box(byte[]) - Static method in class org.klojang.util.ArrayMethods
Converts a byte array to a Byte array.
box(char[]) - Static method in class org.klojang.util.ArrayMethods
Converts a char array to a Character array.
box(double[]) - Static method in class org.klojang.util.ArrayMethods
Converts a double array to a Double array.
box(float[]) - Static method in class org.klojang.util.ArrayMethods
Converts a float array to a Float array.
box(int[]) - Static method in class org.klojang.util.ArrayMethods
Converts an int array to an Integer array.
box(long[]) - Static method in class org.klojang.util.ArrayMethods
Converts a long array to a Long array.
box(short[]) - Static method in class org.klojang.util.ArrayMethods
Converts a short array to a Short array.
box(Class<?>) - Static method in class org.klojang.util.ClassMethods
Returns the wrapper class corresponding to the specified class if it is a primitive type; else the class itself is returned.
boxed() - Method in record class org.klojang.util.ArrayType
Returns the ArrayType for the boxed version of the base type.
BYTE_ARRAY - Static variable in record class org.klojang.util.ArrayType
ArrayType encoding a one-dimensional byte array.

C

capacity() - Method in class org.klojang.util.collection.IntArrayList
 
capacity() - Method in interface org.klojang.util.collection.IntList
Returns the current capacity of the list (the length of the backing array).
cast(T) - Static method in class org.klojang.util.ClassMethods
Performs a brute-force cast to <R> of the specified object.
chars(char...) - Static method in class org.klojang.util.ArrayMethods
Simply returns the specified array, but allows for leaner code when statically imported.
clamp(int, IntRelation, int) - Static method in class org.klojang.util.ObjectMethods
Retains a value if it has a certain relation to another value, else replaces it with that value.
clamp(T, Relation<T, T>, T) - Static method in class org.klojang.util.ObjectMethods
Replaces a value with another value if it has a certain relation to that value.
ClassMethods - Class in org.klojang.util
Methods for inspecting types.
className(Class<?>) - Static method in class org.klojang.util.ClassMethods
Returns a prettified version of the fully-qualified class name.
className(Object) - Static method in class org.klojang.util.ClassMethods
Returns a prettified version of the specified object's fully-qualified class name.
clear() - Method in class org.klojang.util.collection.EnumToIntMap
Removes all mappings from this map.
clear() - Method in class org.klojang.util.collection.IntArrayList
 
clear() - Method in interface org.klojang.util.collection.IntList
Clears the list.
CollectionMethods - Class in org.klojang.util
Methods extending the Java Collection framework.
collectionToList(Collection<? extends T>, Function<? super T, ? extends U>) - Static method in class org.klojang.util.CollectionMethods
Shortcut method.
collectionToMap(Collection<V>, Function<? super V, ? extends K>) - Static method in class org.klojang.util.CollectionMethods
Shortcut method.
collectionToSet(Collection<? extends T>, Function<? super T, ? extends U>) - Static method in class org.klojang.util.CollectionMethods
Shortcut method.
concat(Object...) - Static method in class org.klojang.util.StringMethods
Concatenates the specified data.
concat(T[], T[]) - Static method in class org.klojang.util.ArrayMethods
Concatenates two arrays.
concat(T[], T[], T[], T[]...) - Static method in class org.klojang.util.ArrayMethods
Concatenates multiple arrays into a single array.
containsKey(K) - Method in class org.klojang.util.collection.EnumToIntMap
Returns true if this map contains a mapping for the specified key.
containsValue(int) - Method in class org.klojang.util.collection.EnumToIntMap
Returns true if this map maps one or more keys to the specified value.
copyOf(Collection<Integer>) - Static method in interface org.klojang.util.collection.IntList
Converts the provided collection of Integer objects to an unmodifiable IntList.
copyOf(IntList) - Static method in interface org.klojang.util.collection.IntList
Returns an unmodifiable copy of the specified IntList.
count(Object, String) - Static method in class org.klojang.util.StringMethods
Counts the number of occurrences of substr within input.
count(Object, String, boolean) - Static method in class org.klojang.util.StringMethods
Counts the number of occurrences of substr within input.
count(Object, String, boolean, int) - Static method in class org.klojang.util.StringMethods
Counts the number of occurrences of substr within input.
countAncestors(Class<?>) - Static method in class org.klojang.util.ClassMethods
Returns the number of classes in the class hierarchy of the specified class.
countDiscrete(Object, String) - Static method in class org.klojang.util.StringMethods
Counts the number of non-overlapping occurrences of substr within input.
countDiscrete(Object, String, boolean) - Static method in class org.klojang.util.StringMethods
Counts the number of non-overlapping occurrences of substr within input.
countDiscrete(Object, String, boolean, int) - Static method in class org.klojang.util.StringMethods
Counts the number of non-overlapping occurrences of substr within input.
countEmptyRowsOnLastGrid(int, int) - Static method in class org.klojang.util.MathMethods
Returns the number of trailing, empty rows in the last grid.
countRowsOnLastGrid(int, int) - Static method in class org.klojang.util.MathMethods
Returns the number of populated rows in the last grid (with the very last row possibly only partly populated).
createTempDir() - Static method in class org.klojang.util.IOMethods
Creates a new, empty directory under the file system's temp directory.
createTempDir(Class<?>) - Static method in class org.klojang.util.IOMethods
Creates a new, empty directory under the file system's temp directory.
createTempDir(Class<?>, boolean) - Static method in class org.klojang.util.IOMethods
Creates a File object with a unique file name, located file system's temp directory.
createTempDir(Class<?>, String, boolean) - Static method in class org.klojang.util.IOMethods
Creates a File object with a unique file name, located in file system's temp directory.
createTempDir(Class<?>, String, String, boolean) - Static method in class org.klojang.util.IOMethods
Creates a File object with a unique file name, located in file system's temp directory.
createTempFile() - Static method in class org.klojang.util.IOMethods
Creates a new, empty file in the file system's temp directory.
createTempFile(Class<?>) - Static method in class org.klojang.util.IOMethods
Creates a new, empty file in the file system's temp directory.
createTempFile(Class<?>, boolean) - Static method in class org.klojang.util.IOMethods
Creates a File object with a unique file name, located file system's temp directory.
createTempFile(Class<?>, String, boolean) - Static method in class org.klojang.util.IOMethods
Creates a File object with a unique file name, located in file system's temp directory.
createTempFile(Class<?>, String, String, boolean) - Static method in class org.klojang.util.IOMethods
Creates a File object with a unique file name, located in file system's temp directory.

D

deepFreeze(Map<K0, V0>, Function<Map.Entry<K0, V0>, Map.Entry<K1, V1>>) - Static method in class org.klojang.util.CollectionMethods
Returns an unmodifiable Map where both keys and values of the input Map have been converted using the specified Function.
deepHashCode(Object) - Static method in class org.klojang.util.ArrayMethods
Returns the deep hash code of an array.
describe(Object) - Static method in record class org.klojang.util.ArrayType
Returns a description of the provided array.
describe(Object) - Static method in class org.klojang.util.ClassMethods
Returns a short description of the argument.
dimensions() - Method in record class org.klojang.util.ArrayType
Returns the value of the dimensions record component.
dimensions(Class<?>) - Static method in record class org.klojang.util.ArrayType
Returns zero for non-array types, and the number of dimensions for array types.
divDown(int, int) - Static method in class org.klojang.util.MathMethods
Equivalent to value / dividedBy.
divHalfDown(int, int) - Static method in class org.klojang.util.MathMethods
Divides the specified value by the specified denominator, rounding down if the remainder is exactly 0.5 (given double-precision calculation).
divHalfUp(int, int) - Static method in class org.klojang.util.MathMethods
Divides the specified value by the specified denominator, rounding up if the remainder is exactly 0.5 (given double-precision calculation).
divUp(int, int) - Static method in class org.klojang.util.MathMethods
Converts to arguments to double, then divides the first argument by the second, and then applies Math.ceil.
doubles(double...) - Static method in class org.klojang.util.ArrayMethods
Simply returns the specified array, but allows for leaner code when statically imported.

E

e2n(T) - Static method in class org.klojang.util.ObjectMethods
Empty-to-null: returns null if the argument is empty (as per ObjectMethods.isEmpty(Object)), else the argument itself.
e2nDeepEquals(Object, Object) - Static method in class org.klojang.util.ObjectMethods
Recursively tests the arguments for equality using empty-equals-null semantics.
e2nEquals(Object, Object) - Static method in class org.klojang.util.ObjectMethods
Tests the provided arguments for equality using empty-equals-null semantics.
e2nHash(Object...) - Static method in class org.klojang.util.ObjectMethods
Generates a hash code for the provided arguments using empty-equals-null semantics.
e2nHashCode(Object) - Static method in class org.klojang.util.ObjectMethods
Generates a hash code for the provided object using empty-equals-null semantics.
e2nTypedHashCode(Object) - Static method in class org.klojang.util.ObjectMethods
Generates a hash code for the provided object using empty-equals-null semantics.
ellipsis(Object, int) - Static method in class org.klojang.util.StringMethods
Returns input.toString() if its length does not exceed maxWidth, else truncates the string and appends "...", such that the new string's length does not exceed maxWidth.
EMPTY_INT_ARRAY - Static variable in class org.klojang.util.ArrayMethods
A zero-length int array.
EMPTY_LONG_ARRAY - Static variable in class org.klojang.util.ArrayMethods
A zero-length long array.
EMPTY_OBJECT_ARRAY - Static variable in class org.klojang.util.ArrayMethods
A zero-length Object array.
EMPTY_STRING - Static variable in class org.klojang.util.StringMethods
The empty string.
EMPTY_STRING_ARRAY - Static variable in class org.klojang.util.ArrayMethods
A zero-length String array.
endsWith(Object, boolean, String...) - Static method in class org.klojang.util.StringMethods
Determines whether input ends with any of the specified suffixes.
endsWith(Object, boolean, Collection<String>) - Static method in class org.klojang.util.StringMethods
Determines whether input ends with any of the specified suffixes.
ensurePrefix(Object, String) - Static method in class org.klojang.util.StringMethods
Prefixes to specified prefix to input if it did not already start with that prefix.
ensureSuffix(Object, String) - Static method in class org.klojang.util.StringMethods
Appends to specified suffix to input if it did not already have that suffix.
entrySet() - Method in class org.klojang.util.collection.EnumToIntMap
Returns a Set view of the mappings contained in this map.
enumClass() - Method in class org.klojang.util.collection.EnumToIntMap
Returns the type of the enum keys in this map.
EnumToIntMap<K> - Class in org.klojang.util.collection
A fast enum-to-int map.
EnumToIntMap(Class<K>) - Constructor for class org.klojang.util.collection.EnumToIntMap
Creates a new empty EnumToIntMap for the specified enum class using Integer.MIN_VALUE as the key-absent-value value.
EnumToIntMap(Class<K>, int) - Constructor for class org.klojang.util.collection.EnumToIntMap
Creates a new EnumToIntMap for the specified enum class with the specified integer as the key-absent-value value.
EnumToIntMap(Class<K>, int, ToIntFunction<K>) - Constructor for class org.klojang.util.collection.EnumToIntMap
Creates a new EnumToIntMap with the specified key-absent-value value and the specified initializer function.
EnumToIntMap(Class<K>, ToIntFunction<K>) - Constructor for class org.klojang.util.collection.EnumToIntMap
Creates a new EnumToIntMap using Integer.MIN_VALUE as the key-absent-value value and with its keys initialized using the specified initializer function.
EnumToIntMap(EnumToIntMap<K>) - Constructor for class org.klojang.util.collection.EnumToIntMap
Instantiates a new EnumToIntMap with the same key-value mappings as the specified EnumToIntMap and with the same key-absent-value value.
EnumToIntMap(EnumToIntMap<K>, int) - Constructor for class org.klojang.util.collection.EnumToIntMap
Instantiates a new EnumToIntMap with the same key-value mappings as the specified EnumToIntMap, but (potentially) with a new key-absent-value.
eq(int) - Method in class org.klojang.util.MutableInt
Corresponds to the == (equals) operation.
eq(MutableInt) - Method in class org.klojang.util.MutableInt
Corresponds to the == (equals) operation.
equals(Object) - Method in record class org.klojang.util.AnyTuple2
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class org.klojang.util.ArrayType
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in class org.klojang.util.collection.EnumToIntMap
Returns true if the argument is an EnumToIntMap for the same enum class and if it contains the same key-value mappings.
equals(Object) - Method in class org.klojang.util.collection.IntArrayList
 
equals(Object) - Method in class org.klojang.util.MutableInt
Returns true if obj is a MutableInt, Integer, Short or Byte with the same value as this MutableInt, false otherwise.
equals(Object) - Method in record class org.klojang.util.Tuple2
Indicates whether some other object is "equal to" this one.
Examples: - Search tag in org.klojang.util.StringMethods.ellipsis(Object, int)
Section
ExceptionMethods - Class in org.klojang.util
Methods related to exception handling.
ExceptionOrigin - Class in org.klojang.util.exception
Provides detailed information about the origin of an exception.
ExceptionOrigin(Throwable, String) - Constructor for class org.klojang.util.exception.ExceptionOrigin
Creates a new ExceptionOrigin for the provided exception, searching its stack trace for an element matching the search string.

F

find(int[], IntPredicate) - Static method in class org.klojang.util.ArrayMethods
Returns the first array element that passes the specified test, or an empty OptionalInt if no element passed the test.
find(T[], Predicate<T>) - Static method in class org.klojang.util.ArrayMethods
Returns the first array element that passes the specified test, or Result.notAvailable() if no element passed the test.
find(T[], Predicate<T>, Function<T, R>) - Static method in class org.klojang.util.ArrayMethods
Returns a Result containing a property of the first array element that passes the specified test, or Result.notAvailable() if no element passed the test.
findFirst(Collection<T>, Predicate<? super T>) - Static method in class org.klojang.util.CollectionMethods
Shortcut method.
first() - Method in record class org.klojang.util.AnyTuple2
Returns the value of the first record component.
first() - Method in record class org.klojang.util.Tuple2
Returns the value of the first record component.
firstToLower(Object) - Static method in class org.klojang.util.StringMethods
Ensures that the first character of the specified string is not an uppercase character.
firstToUpper(Object) - Static method in class org.klojang.util.StringMethods
Ensures that the first character of the specified string is not a lowercase character.
floats(float...) - Static method in class org.klojang.util.ArrayMethods
Simply returns the specified array, but allows for leaner code when statically imported.
forArray(Object) - Static method in record class org.klojang.util.ArrayType
Returns the ArrayType corresponding to the specified array object.
forClass(Class<?>) - Static method in record class org.klojang.util.ArrayType
Returns the ArrayType corresponding to the specified array class.
forEach(IntConsumer) - Method in class org.klojang.util.collection.IntArrayList
 
forEach(IntConsumer) - Method in interface org.klojang.util.collection.IntList
Carries out the specified action for each of the elements in the list.
forEach(ObjIntConsumer<K>) - Method in class org.klojang.util.collection.EnumToIntMap
Performs the given action for each entry in this map until all entries have been processed or the action throws an exception.
forEachThrowing(FallibleIntConsumer<E>) - Method in class org.klojang.util.collection.IntArrayList
 
forEachThrowing(FallibleIntConsumer<E>) - Method in interface org.klojang.util.collection.IntList
Carries out the specified action for each of the elements in the list.
freeze(List<? extends T>, FallibleFunction<? super T, ? extends U, E>) - Static method in class org.klojang.util.CollectionMethods
Returns an unmodifiable List containing the values that result from applying the specified function to the source list's elements.
freeze(Map<K, V0>, BiFunction<? super K, ? super V0, ? extends V1>) - Static method in class org.klojang.util.CollectionMethods
Returns an unmodifiable Map where the values of the input Map have been converted using the specified BiFunction.
freeze(Map<K, V0>, Function<? super V0, ? extends V1>) - Static method in class org.klojang.util.CollectionMethods
Returns an unmodifiable Map where the values of the input Map have been converted using the specified Function.
freeze(Set<? extends T>, FallibleFunction<? super T, ? extends U, E>) - Static method in class org.klojang.util.CollectionMethods
Returns an unmodifiable Set containing the values that result from applying the specified function to the source set's elements.

G

geStackTraceElement() - Method in class org.klojang.util.exception.ExceptionOrigin
Returns the first stack trace element matching the search string.
get() - Method in class org.klojang.util.MutableInt
Returns the current value of this MutableInt.
get(int) - Method in class org.klojang.util.collection.IntArrayList
 
get(int) - Method in interface org.klojang.util.collection.IntList
Returns the value at the specified index.
get(K) - Method in class org.klojang.util.collection.EnumToIntMap
Returns the value to which the specified enum constant is mapped, or the key-absent-value if this map contains no mapping for the key.
getAllInterfaces(Class<?>) - Static method in class org.klojang.util.ClassMethods
Returns the entire interface hierarchy, both "horizontal" and "vertical", associated with specified class or interface.
getAncestors(Class<?>) - Static method in class org.klojang.util.ClassMethods
Returns the class hierarchy of the specified class up to, and including Object.class.
getArrayElement(Object, int) - Static method in class org.klojang.util.InvokeMethods
Returns the array element at the specified index.
getArrayLength(Object) - Static method in class org.klojang.util.InvokeMethods
Returns the length of the provided array.
getCause() - Method in exception class org.klojang.util.exception.RootException
Calls getCause() on the root exception.
getCause() - Method in exception class org.klojang.util.exception.UncheckedException
Calls getCause() on the wrapped exception.
getClassName() - Method in class org.klojang.util.exception.ExceptionOrigin
Returns the class in which the exception occurred or null if the exception came without a stack trace.
getColumn(int, int) - Static method in class org.klojang.util.MathMethods
Returns the column index of an item with the specified array index, given the specified number of columns per grid.
getColumnCM(int, int, int) - Static method in class org.klojang.util.MathMethods
Returns the column index of an item in a column-major layout.
getContents(InputStream) - Static method in class org.klojang.util.IOMethods
Returns a String created from the bytes read from the specified input stream.
getContents(InputStream, int) - Static method in class org.klojang.util.IOMethods
Returns a String created from the bytes read from the specified input stream.
getContents(Class<?>, String) - Static method in class org.klojang.util.IOMethods
Returns the contents of the specified resource.
getContents(Class<?>, String, int) - Static method in class org.klojang.util.IOMethods
Returns the contents of the specified resource.
getContents(String) - Static method in class org.klojang.util.IOMethods
Returns the contents of the specified file.
getCustomMessage() - Method in exception class org.klojang.util.exception.RootException
Returns an Optional containing the custom message passed in through the two-arg constructor, or an empty Optional if the single-arg constructor was used.
getCustomMessage() - Method in exception class org.klojang.util.exception.UncheckedException
Returns an Optional containing the custom message passed in through the two-arg constructor, or an empty Optional if the single-arg constructor was used.
getDetailedMessage() - Method in class org.klojang.util.exception.ExceptionOrigin
Provides a detailed exception message that includes the class, method and line number of the first statement in the stack trace that matches the search string.
getDetailedMessage(Throwable, String) - Static method in class org.klojang.util.ExceptionMethods
Provides a detailed exception message that includes the class, method and line number of the first statement in the specified exception's stack trace that matches the search string.
getException() - Method in class org.klojang.util.exception.ExceptionOrigin
Returns the exception wrapped by this ExceptionOrigin.
getGrid(int, int, int) - Static method in class org.klojang.util.MathMethods
Returns the array index of the grid within an array of stack that will contain the item with the specified index in a one-dimensional array.
getGridCount(int, int) - Static method in class org.klojang.util.MathMethods
Returns the number of grids needed to contain the specified number of rows.
getGridCount(int, int, int) - Static method in class org.klojang.util.MathMethods
Returns the number of rows x cols stack needed to contain the specified number of items.
getGridRowColumn(int, int, int) - Static method in class org.klojang.util.MathMethods
Returns grid, row, and column index of an item with the specified array index.
getGridRowColumnCM(int, int, int) - Static method in class org.klojang.util.MathMethods
Returns the grid, row, and column index of an item in a column-major layout.
getLine() - Method in class org.klojang.util.exception.ExceptionOrigin
Returns the line at which the exception occurred or -1 if the exception came without a stack trace.
getLineAndColumn(String, int) - Static method in class org.klojang.util.StringMethods
Returns the line number and column number of the character at the specified index, given the system-defined line separator.
getLineAndColumn(String, int, String) - Static method in class org.klojang.util.StringMethods
Returns the line number and column number of the character at the specified index, given the specified line separator.
getLocalizedMessage() - Method in exception class org.klojang.util.exception.RootException
Calls getLocalizedMessage() on the root cause.
getLocalizedMessage() - Method in exception class org.klojang.util.exception.UncheckedException
Calls getLocalizedMessage() on the wrapped exception
getMessage() - Method in exception class org.klojang.util.exception.RootException
Calls getMessage() on the root cause.
getMessage() - Method in exception class org.klojang.util.exception.UncheckedException
Calls getMessage() on the wrapped exception
getMethod() - Method in class org.klojang.util.exception.ExceptionOrigin
Returns the method in which the exception occurred or null if the exception came without a stack trace.
getMinIncrease(int, int, int) - Static method in enum class org.klojang.util.ResizeMethod
Calculates the extra capacity required to add itemCount items to an internally managed buffer, cache or backing array.
getModule() - Method in class org.klojang.util.exception.ExceptionOrigin
Returns the module in which the exception occurred or null if the exception came without a stack trace.
getOrDefault(K, int) - Method in class org.klojang.util.collection.EnumToIntMap
Returns the value associated with the specified enum constant or dfault if the map did not contain an entry for the specified enum constant.
getRootCause(Throwable) - Static method in class org.klojang.util.ExceptionMethods
Returns the root cause of the specified Throwable, or the Throwable itself if it has no cause.
getRootStackTrace(Throwable, String...) - Static method in class org.klojang.util.ExceptionMethods
Returns the stack trace of the root cause of the specified exception, using the specified string(s) to filter stack trace elements.
getRootStackTraceAsString(Throwable) - Static method in class org.klojang.util.ExceptionMethods
Returns the stack trace of the root cause of the specified Throwable as a String.
getRootStackTraceAsString(Throwable, String...) - Static method in class org.klojang.util.ExceptionMethods
Returns the exception message and stack trace of the root cause of the specified Throwable, using the specified string(s) to filter stack trace elements.
getRow(int, int, int) - Static method in class org.klojang.util.MathMethods
Returns the row index of an item, relative to the grid that it finds itself on.
getRowCM(int, int) - Static method in class org.klojang.util.MathMethods
Returns the row index of an item in a column-major layout.
getStackTrace() - Method in exception class org.klojang.util.exception.RootException
Calls getStackTrace() on the root exception.
getStackTrace() - Method in exception class org.klojang.util.exception.UncheckedException
Calls getStackTrace() on the wrapped exception
getTypeDefault(Class<T>) - Static method in class org.klojang.util.ClassMethods
Returns zero, cast to the appropriate type, for primitive types; null for any other type.
gt(int) - Method in class org.klojang.util.MutableInt
Corresponds to the > (greater than) operation.
gt(MutableInt) - Method in class org.klojang.util.MutableInt
Corresponds to the > (greater than) operation.
gte(int) - Method in class org.klojang.util.MutableInt
Corresponds to the >= (greater or equal) operation.
gte(MutableInt) - Method in class org.klojang.util.MutableInt
Corresponds to the >= (greater or equal) operation.

H

hardCast(T) - Static method in class org.klojang.util.ObjectMethods
Does a brute-force cast of one type to another.
hashCode() - Method in record class org.klojang.util.AnyTuple2
Returns a hash code value for this object.
hashCode() - Method in record class org.klojang.util.ArrayType
Returns a hash code value for this object.
hashCode() - Method in class org.klojang.util.collection.EnumToIntMap
 
hashCode() - Method in class org.klojang.util.collection.IntArrayList
 
hashCode() - Method in class org.klojang.util.MutableInt
Returns the current value of this instance
hashCode() - Method in record class org.klojang.util.Tuple2
Returns a hash code value for this object.
hashCode(Object) - Static method in class org.klojang.util.ArrayMethods
Returns the hash code of an array.

I

ifBlank(Object, String) - Static method in class org.klojang.util.StringMethods
Returns the 1st argument if it is not a whitespace-only string, else the 2nd argument.
ifEmpty(T, FallibleSupplier<? extends T, E>) - Static method in class org.klojang.util.ObjectMethods
Returns the first argument if it is not empty (as per ObjectMethods.isEmpty(Object)), else the value produced by the specified Supplier (which may be empty as well).
ifEmpty(T, T) - Static method in class org.klojang.util.ObjectMethods
Returns the first argument if it is not empty (as per ObjectMethods.isEmpty(Object)), else the second argument.
ifNotEmpty(T, Function<T, U>) - Static method in class org.klojang.util.ObjectMethods
Returns the result of passing the specified argument to the specified Function if the argument is not empty, else returns null.
ifNotEmpty(T, Function<T, U>, U) - Static method in class org.klojang.util.ObjectMethods
Returns the result of passing the specified argument to the specified Function if the argument is not empty, else a default value.
ifNotNull(T, Function<T, U>) - Static method in class org.klojang.util.ObjectMethods
Returns the result of passing the specified argument to the specified Function if the argument is not null, else returns null.
ifNotNull(T, Function<T, U>, U) - Static method in class org.klojang.util.ObjectMethods
Returns the result of passing the specified argument to the specified Function if the argument is not null, else a default value.
ifNull(T, FallibleSupplier<? extends T, E>) - Static method in class org.klojang.util.ObjectMethods
Returns the first argument if it is not null, else the value produced by the specified Supplier.
ifNull(T, T) - Static method in class org.klojang.util.ObjectMethods
Returns the first argument if it is not null, else the second argument.
implode(Collection<T>) - Static method in class org.klojang.util.CollectionMethods
PHP-style implode method, concatenating the collection elements using ", " (comma-space) as separator.
implode(Collection<T>, int) - Static method in class org.klojang.util.CollectionMethods
PHP-style implode method, concatenating at most limit collection elements using ", " (comma-space) as separator.
implode(Collection<T>, String) - Static method in class org.klojang.util.CollectionMethods
PHP-style implode method, concatenating the collection elements with the specified separator.
implode(Collection<T>, String, int) - Static method in class org.klojang.util.CollectionMethods
PHP-style implode method, concatenating at most limit collection elements using the specified separator.
implode(Collection<T>, Function<T, String>) - Static method in class org.klojang.util.CollectionMethods
PHP-style implode method, concatenating at most limit collection elements using ", " (comma-space) as separator.
implode(Collection<T>, Function<T, String>, String) - Static method in class org.klojang.util.CollectionMethods
PHP-style implode method, concatenating at most limit collection elements using ", " (comma-space) as separator.
implode(Collection<T>, Function<T, String>, String, int, int) - Static method in class org.klojang.util.CollectionMethods
PHP-style implode method.
implode(T[]) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator.
implode(T[], int) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating at most limit array elements using ", " (comma+space) as separator.
implode(T[], String) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating the array elements using the specified separator.
implode(T[], String, int) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating at most limit array elements using the specified separator.
implode(T[], Function<T, String>) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating at most limit array elements using ", " (comma+space) as separator.
implode(T[], Function<T, String>, String) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating at most limit array elements using ", " (comma+space) as separator.
implode(T[], Function<T, String>, String, int, int) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method.
implodeAny(Object) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator.
implodeAny(Object, int) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating at most limit array elements using ", " (comma+space) as separator.
implodeAny(Object, String) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating the array elements using the specified separator.
implodeAny(Object, String, int) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating at most limit array elements using the specified separator.
implodeAny(Object, Function<Object, String>) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator.
implodeAny(Object, Function<Object, String>, String) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator.
implodeAny(Object, Function<Object, String>, String, int, int) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method.
implodeInts(int[]) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator.
implodeInts(int[], int) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating at most limit array elements using ", " (comma+space) as separator.
implodeInts(int[], String) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating the array elements using the specified separator.
implodeInts(int[], String, int) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating at most limit array elements using the specified separator.
implodeInts(int[], IntFunction<String>) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, concatenating at most limit array elements using ", " (comma+space) as separator.
implodeInts(int[], IntFunction<String>, String, int, int) - Static method in class org.klojang.util.ArrayMethods
PHP-style implode method, optimized for int[] arrays.
indexOf(int) - Method in class org.klojang.util.collection.IntArrayList
 
indexOf(int) - Method in interface org.klojang.util.collection.IntList
Returns an OptionalInt containing the array index of the first occurrence of the specified value, or an empty OptionalInt if the value is not present.
indexOf(int[], int) - Static method in class org.klojang.util.ArrayMethods
Returns an OptionalInt containing the array index of the first occurrence of the specified value within the specified array.
indexOf(Object, String, int) - Static method in class org.klojang.util.StringMethods
Returns the index of the nth occurrence of the specified substring within input.
indexOf(T[], T) - Static method in class org.klojang.util.ArrayMethods
Returns the array index of the first occurrence of the specified value within the specified array.
indexOfLastGrid(int, int) - Static method in class org.klojang.util.MathMethods
Returns the array index of the last grid within an array of stack containing the specified number rows.
initCause(Throwable) - Method in exception class org.klojang.util.exception.RootException
Throws an UnsupportedOperationException.
initCause(Throwable) - Method in exception class org.klojang.util.exception.UncheckedException
Throws an UnsupportedOperationException.
initializeList(int, E) - Static method in class org.klojang.util.CollectionMethods
Returns a fixed-size, mutable List with all elements initialized to the specified value.
initializeList(int, Supplier<E>) - Static method in class org.klojang.util.CollectionMethods
Returns a fixed-size, mutable List with all elements initialized to values provided by a Supplier.
initializeMap(Object...) - Static method in class org.klojang.util.CollectionMethods
Returns a HashMap initialized with the specified key-value pairs.
INT_ARRAY - Static variable in record class org.klojang.util.ArrayType
ArrayType encoding a one-dimensional int array.
IntArrayList - Class in org.klojang.util.collection
A mutable list of int values.
IntArrayList() - Constructor for class org.klojang.util.collection.IntArrayList
Creates an IntList with an initial capacity of 10.
IntArrayList(int) - Constructor for class org.klojang.util.collection.IntArrayList
Creates an IntList with the specified initial capacity.
IntArrayList(int, int) - Constructor for class org.klojang.util.collection.IntArrayList
Creates an IntList with the specified initial capacity.
IntArrayList(int, ResizeMethod, float) - Constructor for class org.klojang.util.collection.IntArrayList
Creates an IntList with the specified initial capacity.
IntArrayList(IntList) - Constructor for class org.klojang.util.collection.IntArrayList
Copy constructor.
IntList - Interface in org.klojang.util.collection
The ubiquitous list-of-int.
ints(int...) - Static method in class org.klojang.util.ArrayMethods
Simply returns the specified array, but allows for leaner code when statically imported.
intValues() - Method in class org.klojang.util.collection.EnumToIntMap
Returns an IntList containing the values of this map.
InvokeException - Exception Class in org.klojang.util
A RuntimeException thrown in response to various dynamic invocation errors.
InvokeException(String) - Constructor for exception class org.klojang.util.InvokeException
 
InvokeMethods - Class in org.klojang.util
Dynamic invocation utility methods.
InvokeMethods() - Constructor for class org.klojang.util.InvokeMethods
 
IOMethods - Class in org.klojang.util
I/O-related methods.
isA(Object, Class<?>) - Static method in class org.klojang.util.ClassMethods
isAbsoluteOrigin() - Method in class org.klojang.util.exception.ExceptionOrigin
Returns true if the stack trace element found using the search term represents the absolute origin of the exception.
isAutoBoxedAs(Class<?>, Class<?>) - Static method in class org.klojang.util.ClassMethods
Returns true if first argument is a primitive type and the second argument is the corresponding wrapper class.
isAutoUnboxedAs(Class<?>, Class<?>) - Static method in class org.klojang.util.ClassMethods
Returns true if first argument is a primitive wrapper type and the second argument is the corresponding primitive type.
isBlank(Object) - Static method in class org.klojang.util.StringMethods
Whether the specified string is null or blank.
isDeeplyPrimitiveArray(Class<?>) - Static method in class org.klojang.util.ClassMethods
Returns true if the specified type represents an array with a primitive type as its deepest-level component type.
isDeepNotEmpty() - Method in record class org.klojang.util.AnyTuple2
Returns true if both components are recursively non-empty as per ObjectMethods.isDeepNotEmpty(Object).
isDeepNotEmpty(Object) - Static method in class org.klojang.util.ObjectMethods
Verifies that the argument is recursively non-empty.
isDeepNotEmpty(Object[]) - Static method in class org.klojang.util.ObjectMethods
Verifies that the specified array is non-null, non-empty, and contains only deep-not-empty keys and values.
isDeepNotEmpty(Collection<?>) - Static method in class org.klojang.util.ObjectMethods
Verifies that the specified collection is non-null, non-empty, and contains only deep-not-empty elements.
isDeepNotEmpty(Map<?, ?>) - Static method in class org.klojang.util.ObjectMethods
Verifies that the specified map is non-null, non-empty, and contains only deep-not-empty keys and values.
isDeepNotNull(Object) - Static method in class org.klojang.util.ObjectMethods
Verifies that the argument is not null and, if it is array, Collection or Map, does not contain any null values.
isElementOf(int, int[]) - Static method in class org.klojang.util.ArrayMethods
Returns true if the specified array contains the specified value.
isElementOf(T, T[]) - Static method in class org.klojang.util.ArrayMethods
Returns true if the specified array contains the specified value.
isEmpty() - Method in record class org.klojang.util.AnyTuple2
Returns true if both components are null, otherwise false.
isEmpty() - Method in class org.klojang.util.collection.EnumToIntMap
Returns true if this map contains no key-value mappings, false otherwise.
isEmpty() - Method in class org.klojang.util.collection.IntArrayList
 
isEmpty() - Method in interface org.klojang.util.collection.IntList
Returns whether the list is empty.
isEmpty(CharSequence) - Static method in class org.klojang.util.ObjectMethods
Returns true if the specified CharSequence is null or empty.
isEmpty(Object) - Static method in class org.klojang.util.ObjectMethods
Returns true if the specified argument is null or empty.
isEmpty(Object[]) - Static method in class org.klojang.util.ObjectMethods
Returns true if the specified array is null or empty.
isEmpty(Collection<?>) - Static method in class org.klojang.util.ObjectMethods
Returns true if the specified Collection is null or empty.
isEmpty(Map<?, ?>) - Static method in class org.klojang.util.ObjectMethods
Returns whether the specified Map is null or empty.
isEmpty(Optional<?>) - Static method in class org.klojang.util.ObjectMethods
Returns true if the specified Optional is empty or contains an empty object.
isEmpty(Emptyable) - Static method in class org.klojang.util.ObjectMethods
Returns true if the specified array is null or empty.
isNullRepellent(Collection<?>) - Static method in class org.klojang.util.CollectionMethods
Returns true if the provided collection is a null-repellent collection like those obtained via List.of(...) and Set.of(...).
isOneOf(Object, Object...) - Static method in class org.klojang.util.ArrayMethods
Returns true if the specified array contains the specified reference.
isPrimitiveArray(Class<?>) - Static method in class org.klojang.util.ClassMethods
Returns true if the specified Class object represents an array of a primitive type.
isPrimitiveArray(Object) - Static method in class org.klojang.util.ClassMethods
Returns true if the specified object is an array of a primitive type or a Class object representing an array of a primitive type.
isPrimitiveNumber(Class<?>) - Static method in class org.klojang.util.ClassMethods
Returns true if the specified class is one of the primitive number classes.
isSubtype(Class<?>, Class<?>) - Static method in class org.klojang.util.ClassMethods
Tests whether the first class is the same as, or a subtype of the second class.
isSupertype(Class<?>, Class<?>) - Static method in class org.klojang.util.ClassMethods
Tests whether the first class is the same as, or a supertype of the second class.
isWrapper(Class<?>) - Static method in class org.klojang.util.ClassMethods
Returns true if the specified class is one of the primitive wrapper classes.

K

keyAbsentValue() - Method in class org.klojang.util.collection.EnumToIntMap
Returns the integer used to signify the absence of a key.
keySet() - Method in class org.klojang.util.collection.EnumToIntMap
Returns a Set view of the keys contained in this map.

L

lastIndexOf(int) - Method in class org.klojang.util.collection.IntArrayList
 
lastIndexOf(int) - Method in interface org.klojang.util.collection.IntList
Returns an OptionalInt containing the array index of the last occurrence of the specified value, or an empty OptionalInt if the value is not present.
lastIndexOf(int[], int) - Static method in class org.klojang.util.ArrayMethods
Returns an OptionalInt containing the array index of the last occurrence of the specified value within the specified array.
lastIndexOf(T[], T) - Static method in class org.klojang.util.ArrayMethods
Returns the array index of the last occurrence of the specified value within the specified array.
lchop(Object, boolean, String...) - Static method in class org.klojang.util.StringMethods
Removes all occurrences of the specified prefixes from the start of a string.
lchop(Object, String...) - Static method in class org.klojang.util.StringMethods
Removes all occurrences of the specified prefixes from the start of a string.
listify(Object) - Static method in class org.klojang.util.CollectionMethods
Converts the specified value to a List.
longs(long...) - Static method in class org.klojang.util.ArrayMethods
Simply returns the specified array, but allows for leaner code when statically imported.
lpad(Object, int) - Static method in class org.klojang.util.StringMethods
Left-pads a string to the specified width using the space character (' ').
lpad(Object, int, char) - Static method in class org.klojang.util.StringMethods
Left-pads a string to the specified width using the specified padding character.
lpad(Object, int, char, String) - Static method in class org.klojang.util.StringMethods
Left-pads a string to the specified width using the specified padding character and then appends the specified terminator.
lt(int) - Method in class org.klojang.util.MutableInt
Corresponds to the < (less than) operation.
lt(MutableInt) - Method in class org.klojang.util.MutableInt
Corresponds to the < (less than) operation.
lte(int) - Method in class org.klojang.util.MutableInt
Corresponds to the <= (less or equal) operation.
lte(MutableInt) - Method in class org.klojang.util.MutableInt
Corresponds to the <= (less or equal) operation.
ltrim(Object, String) - Static method in class org.klojang.util.StringMethods
Left-trims all characters contained in chars from the specified string.

M

MathMethods - Class in org.klojang.util
Math-related methods.
MAX_INCREASE - Static variable in enum class org.klojang.util.ResizeMethod
The maximum increase in size allowed by the ResizeMethod.MULTIPLY and ResizeMethod.PERCENTAGE resize methods: 8 * 1024 * 1024.
minIs(int) - Method in class org.klojang.util.MutableInt
Corresponds to the -= (minus-is) operation.
minIs(MutableInt) - Method in class org.klojang.util.MutableInt
Corresponds to the -= (minus-is) operation.
mm() - Method in class org.klojang.util.MutableInt
Corresponds to the -- postfix operator (i--).
mmi() - Method in class org.klojang.util.MutableInt
Corresponds to the -- prefix operator (--i).
ModulePrivate - Annotation Interface in org.klojang.util
This annotation is meant to be applied to publicly accessible elements within the exported packages of a Java 9+ module that should nevertheless be treated as module-private.
MULTIPLY - Enum constant in enum class org.klojang.util.ResizeMethod
Increase the capacity by multiplying the current capacity by a fixed amount.
MutableInt - Class in org.klojang.util
The ubiquitous mutable-integer class.
MutableInt() - Constructor for class org.klojang.util.MutableInt
Instantiates a MutableInt with an initial value of 0 (zero).
MutableInt(int) - Constructor for class org.klojang.util.MutableInt
Instantiates a MutableInt with the specified initial value.
MutableInt(MutableInt) - Constructor for class org.klojang.util.MutableInt
Instantiates a MutableInt initialized to the current value of another instance.

N

n2e(Boolean) - Static method in class org.klojang.util.ObjectMethods
Returns Boolean.FALSE if the argument is null, else the argument itself.
n2e(Byte) - Static method in class org.klojang.util.ObjectMethods
Returns zero if the argument is null, else the argument itself.
n2e(Character) - Static method in class org.klojang.util.ObjectMethods
Returns zero if the argument is null, else the argument itself.
n2e(Double) - Static method in class org.klojang.util.ObjectMethods
Returns zero if the argument is null, else the argument itself.
n2e(Float) - Static method in class org.klojang.util.ObjectMethods
Returns zero if the argument is null, else the argument itself.
n2e(Integer) - Static method in class org.klojang.util.ObjectMethods
Returns zero if the argument is null, else the argument itself.
n2e(Long) - Static method in class org.klojang.util.ObjectMethods
Returns zero if the argument is null, else the argument itself.
n2e(Short) - Static method in class org.klojang.util.ObjectMethods
Returns zero if the argument is null, else the argument itself.
n2e(String) - Static method in class org.klojang.util.ObjectMethods
Null-to-empty: returns an empty String if the argument is null, else the argument itself.
n2e(List<T>) - Static method in class org.klojang.util.ObjectMethods
Null-to-empty: returns Collections.emptyList() if the argument is null, else the argument itself.
n2e(Map<K, V>) - Static method in class org.klojang.util.ObjectMethods
Null-to-empty: returns Collections.emptyMap() if the argument is null, else the argument itself.
n2e(Set<T>) - Static method in class org.klojang.util.ObjectMethods
Null-to-empty: returns Collections.emptySet() if the argument is null, else the argument itself.
ne(int) - Method in class org.klojang.util.MutableInt
Corresponds to the != (not equals) operation.
ne(MutableInt) - Method in class org.klojang.util.MutableInt
Corresponds to the != (not equals) operation.
nearest(int, int, int) - Static method in class org.klojang.util.MathMethods
Returns the value that is closest to the reference value.
newArray(Class<?>, int) - Static method in class org.klojang.util.InvokeMethods
Returns a new array with the specified length.
newArrayList(int, E...) - Static method in class org.klojang.util.CollectionMethods
Returns a new ArrayList initialized with the specified values.
newHashMap(int, Class<K>, Class<V>, Object...) - Static method in class org.klojang.util.CollectionMethods
Returns a HashMap initialized with the specified key-value pairs.
newInstance(Class<T>) - Static method in class org.klojang.util.InvokeMethods
Returns a new instance of the specified class using its no-arg constructor.
newInstance(Class<T>, int) - Static method in class org.klojang.util.InvokeMethods
Returns a new instance of the specified class using the constructor that takes a single int argument.
nullIf(T, T...) - Static method in class org.klojang.util.ObjectMethods
Returns null if the first argument is among the forbidden values, else the first argument itself.
nullUnless(T, T...) - Static method in class org.klojang.util.ObjectMethods
Returns this first argument if it is among the allowed values, else null.

O

ObjectMethods - Class in org.klojang.util
General methods applicable to objects of any type.
of() - Static method in interface org.klojang.util.collection.IntList
Returns an unmodifiable, empty IntList.
of(int) - Static method in interface org.klojang.util.collection.IntList
Returns an unmodifiable IntList containing the provided element.
of(int...) - Static method in interface org.klojang.util.collection.IntList
Returns an unmodifiable IntList containing the provided elements.
of(int, int) - Static method in interface org.klojang.util.collection.IntList
Returns an unmodifiable IntList containing the provided elements.
of(int, int, int) - Static method in interface org.klojang.util.collection.IntList
Returns an unmodifiable IntList containing the provided elements.
of(int, int, int, int) - Static method in interface org.klojang.util.collection.IntList
Returns an unmodifiable IntList containing the provided elements.
of(int, int, int, int, int) - Static method in interface org.klojang.util.collection.IntList
Returns an unmodifiable IntList containing the provided elements.
of(T, U) - Static method in record class org.klojang.util.AnyTuple2
Returns a AnyTuple2 consisting of the specified components.
of(T, U) - Static method in record class org.klojang.util.Tuple2
Returns a Tuple2 consisting of the specified components.
ofElements(int[]) - Static method in interface org.klojang.util.collection.IntList
Returns an unmodifiable IntList containing the specified elements.
org.klojang.util - module org.klojang.util
Basic Java language utilities.
org.klojang.util - package org.klojang.util
Utility classes for working with strings, numbers, arrays, collections, etc.
org.klojang.util.collection - package org.klojang.util.collection
Garden-variety extensions to the Collections Framework.
org.klojang.util.exception - package org.klojang.util.exception
Classes related to exception handling.

P

pack(T...) - Static method in class org.klojang.util.ArrayMethods
Simply returns the specified array, but allows for leaner code when statically imported.
pad(Object, int) - Static method in class org.klojang.util.StringMethods
Centers (left- and right-pads) a string within the specified width using the space character.
pad(Object, int, char) - Static method in class org.klojang.util.StringMethods
Centers (left- and right-pads) a string within the specified width using the specified padding character.
pad(Object, int, char, String) - Static method in class org.klojang.util.StringMethods
Centers (left- and right-pads) a string within the specified width using the specified padding character and then appends the specified delimiter.
PERCENTAGE - Enum constant in enum class org.klojang.util.ResizeMethod
Increase the capacity by adding a fixed percentage of the current capacity to the current capacity.
pipe(InputStream, OutputStream) - Static method in class org.klojang.util.IOMethods
Reads all bytes from the specified input stream and writes them to the specified output stream.
pipe(InputStream, OutputStream, int) - Static method in class org.klojang.util.IOMethods
Reads all bytes from the specified input stream and writes them to the specified output stream.
plusIs(int) - Method in class org.klojang.util.MutableInt
Corresponds to the += operation.
plusIs(MutableInt) - Method in class org.klojang.util.MutableInt
Corresponds to the += operation.
pp() - Method in class org.klojang.util.MutableInt
Corresponds to the ++ postfix operator (i++).
ppi() - Method in class org.klojang.util.MutableInt
Corresponds to the ++ prefix operator (++i).
prefix(T[], T) - Static method in class org.klojang.util.ArrayMethods
Prefixes the specified object to the specified array.
prefix(T[], T, T, T...) - Static method in class org.klojang.util.ArrayMethods
Prefixes the specified object to the specified array.
printStackTrace() - Method in exception class org.klojang.util.exception.RootException
Calls printStackTrace() on the root exception.
printStackTrace() - Method in exception class org.klojang.util.exception.UncheckedException
Calls printStackTrace() on the wrapped exception
printStackTrace(PrintStream) - Method in exception class org.klojang.util.exception.RootException
Calls printStackTrace() on the root exception.
printStackTrace(PrintStream) - Method in exception class org.klojang.util.exception.UncheckedException
Calls printStackTrace() on the wrapped exception
printStackTrace(PrintWriter) - Method in exception class org.klojang.util.exception.RootException
Calls printStackTrace() on the wrapped exception
printStackTrace(PrintWriter) - Method in exception class org.klojang.util.exception.UncheckedException
Calls printStackTrace on the wrapped exception.
put(K, int) - Method in class org.klojang.util.collection.EnumToIntMap
Associates the specified value with the specified key in this map.
putAll(Map<K, Integer>) - Method in class org.klojang.util.collection.EnumToIntMap
Adds all entries of the specified map to this map.
putAll(EnumToIntMap<K>) - Method in class org.klojang.util.collection.EnumToIntMap
Adds all entries of the specified map to this map, overwriting any previous values.

R

rchop(Object, boolean, String...) - Static method in class org.klojang.util.StringMethods
Removes all occurrences of the specified suffixes from the end of a string.
rchop(Object, String...) - Static method in class org.klojang.util.StringMethods
Removes all occurrences of the specified suffixes from the end of a string.
readBytes(InputStream) - Static method in class org.klojang.util.IOMethods
Returns a byte[] array containing the bytes read from the specified input stream.
readBytes(InputStream, int) - Static method in class org.klojang.util.IOMethods
Returns a byte[] array containing the bytes read from the specified input stream.
readBytes(Class<?>, String) - Static method in class org.klojang.util.IOMethods
Returns the contents of the specified resource as a byte array.
readBytes(Class<?>, String, int) - Static method in class org.klojang.util.IOMethods
Returns the contents of the specified resource as a byte array.
refIndexOf(Object[], Object) - Static method in class org.klojang.util.ArrayMethods
Returns the array index of the first occurrence of the specified object, using reference comparisons to identify the object.
refLastIndexOf(Object[], Object) - Static method in class org.klojang.util.ArrayMethods
Returns the array index of the last occurrence of the specified object, using reference comparisons to identify the object.
remove(K) - Method in class org.klojang.util.collection.EnumToIntMap
Removes the mapping for a key from this map if it is present.
removeAll(int...) - Method in class org.klojang.util.collection.IntArrayList
 
removeAll(int...) - Method in interface org.klojang.util.collection.IntList
Removes the specified values from this IntList.
removeAll(Collection<?>) - Method in class org.klojang.util.collection.IntArrayList
 
removeAll(Collection<?>) - Method in interface org.klojang.util.collection.IntList
Removes the values contained in the specified Collection from this IntList.
removeAll(IntList) - Method in class org.klojang.util.collection.IntArrayList
 
removeAll(IntList) - Method in interface org.klojang.util.collection.IntList
Removes the values contained in the specified IntList from this IntList
removeByIndex(int) - Method in class org.klojang.util.collection.IntArrayList
 
removeByIndex(int) - Method in interface org.klojang.util.collection.IntList
Removes the element at the specified index
removeByValue(int) - Method in class org.klojang.util.collection.IntArrayList
 
removeByValue(int) - Method in interface org.klojang.util.collection.IntList
Removes the first occurrence of the specified value in this IntList.
replaceIf(int, IntPredicate, int) - Static method in class org.klojang.util.ObjectMethods
Replaces a value with another value if it satisfies a certain criterion.
replaceIf(int, IntRelation, int, int) - Static method in class org.klojang.util.ObjectMethods
Replaces a value with another value if it has a certain relation to yet another value.
replaceIf(T, Predicate<? super T>, T) - Static method in class org.klojang.util.ObjectMethods
Replaces a value with another value if it satisfies a certain criterion.
replaceIf(T, Relation<T, T>, T, T) - Static method in class org.klojang.util.ObjectMethods
Replaces a value with another value if it has a certain relation to yet another value.
reset() - Method in class org.klojang.util.MutableInt
Sets the value to 0 (zero).
resize(int, double) - Method in enum class org.klojang.util.ResizeMethod
Calculates the new capacity for a buffer, cache or backing array using this ResizeMethod and the specified resize amount (c.q. factor c.q. percentage) The capacity will increase by at least 1.
resize(int, double, int) - Method in enum class org.klojang.util.ResizeMethod
Calculates the new capacity for a buffer, cache or backing array using this ResizeMethod.
ResizeMethod - Enum Class in org.klojang.util
Defines ways to increase the capacity of backing arrays and other types of internally managed buffers and caches.
retainAll(int...) - Method in class org.klojang.util.collection.IntArrayList
 
retainAll(int...) - Method in interface org.klojang.util.collection.IntList
Removes all values that are not in the specified IntList.
retainAll(Collection<?>) - Method in class org.klojang.util.collection.IntArrayList
 
retainAll(Collection<?>) - Method in interface org.klojang.util.collection.IntList
Removes all values that are not in the specified IntList.
retainAll(IntList) - Method in class org.klojang.util.collection.IntArrayList
 
retainAll(IntList) - Method in interface org.klojang.util.collection.IntList
Removes all values that are not in the specified IntList.
reverse(int[]) - Static method in class org.klojang.util.ArrayMethods
Reverses the order of the elements in the specified array.
reverse(int[], int, int) - Static method in class org.klojang.util.ArrayMethods
Reverses the order of the elements in the specified array segment
reverse(T[]) - Static method in class org.klojang.util.ArrayMethods
Reverses the order of the elements in the specified array.
reverse(T[], int, int) - Static method in class org.klojang.util.ArrayMethods
Reverses the order of the elements in the specified array segment.
rm(File) - Static method in class org.klojang.util.IOMethods
Deletes a file or directory.
rm(String) - Static method in class org.klojang.util.IOMethods
Deletes a file or directory.
rootCause(Throwable) - Static method in class org.klojang.util.ExceptionMethods
Returns the specified throwable if it already is a RuntimeException, else an RootException exception wrapping the root cause of the provided exception.
rootCause(Throwable, String) - Static method in class org.klojang.util.ExceptionMethods
Returns the specified throwable if it already is a RuntimeException, else an RootException exception wrapping the root cause of the provided exception.
RootException - Exception Class in org.klojang.util.exception
A RuntimeException that behaves as though it is the root cause of the provided exception.
RootException(String, Throwable) - Constructor for exception class org.klojang.util.exception.RootException
Creates a RootException with a custom message.
RootException(Throwable) - Constructor for exception class org.klojang.util.exception.RootException
Creates a RootException wrapping the root cause of the provided Exception.
rpad(Object, int) - Static method in class org.klojang.util.StringMethods
Right-pads a string to the specified width using the space character (' ').
rpad(Object, int, char) - Static method in class org.klojang.util.StringMethods
Right-pads a string to the specified width using the specified padding character.
rpad(Object, int, char, String) - Static method in class org.klojang.util.StringMethods
Right-pads a string to the specified width using the specified padding character and appends the specified suffix.
rtrim(Object, String) - Static method in class org.klojang.util.StringMethods
Right-trims all characters contained in chars from the specified string.

S

saturatedEnumMap(Class<K>, V...) - Static method in class org.klojang.util.CollectionMethods
Returns an EnumMap with all enum constants set to non-null values.
second() - Method in record class org.klojang.util.AnyTuple2
Returns the value of the second record component.
second() - Method in record class org.klojang.util.Tuple2
Returns the value of the second record component.
set(int) - Method in class org.klojang.util.MutableInt
Corresponds to the assignment operation (i = j).
set(int, int) - Method in class org.klojang.util.collection.IntArrayList
 
set(int, int) - Method in interface org.klojang.util.collection.IntList
Sets the value at the specified index.
set(K, int) - Method in class org.klojang.util.collection.EnumToIntMap
Much like put, but provides a fluent API for adding entries to the map.
set(MutableInt) - Method in class org.klojang.util.MutableInt
Corresponds to the assignment operation (i = j).
setArrayElement(Object, int, Object) - Static method in class org.klojang.util.InvokeMethods
Sets the element at the specified index.
setCapacity(int) - Method in class org.klojang.util.collection.IntArrayList
 
setCapacity(int) - Method in interface org.klojang.util.collection.IntList
Resizes the backing array.
setStackTrace(StackTraceElement[]) - Method in exception class org.klojang.util.exception.RootException
Throws an UnsupportedOperationException.
setStackTrace(StackTraceElement[]) - Method in exception class org.klojang.util.exception.UncheckedException
Throws an UnsupportedOperationException.
simpleClassName(Class<?>) - Static method in class org.klojang.util.ClassMethods
Returns a prettified version of the simple class name.
simpleClassName(Object) - Static method in class org.klojang.util.ClassMethods
Returns a prettified version of an object's simple class name.
size() - Method in class org.klojang.util.collection.EnumToIntMap
Returns the number of key-value mappings in this map.
size() - Method in class org.klojang.util.collection.IntArrayList
 
size() - Method in interface org.klojang.util.collection.IntList
Returns the current size of the list.
sort() - Method in class org.klojang.util.collection.IntArrayList
 
sort() - Method in interface org.klojang.util.collection.IntList
Sorts the elements in this list in ascending order.
sortDescending() - Method in class org.klojang.util.collection.IntArrayList
 
sortDescending() - Method in interface org.klojang.util.collection.IntList
Sorts the elements in this list in descending order.
startsWith(Object, boolean, String...) - Static method in class org.klojang.util.StringMethods
Determines whether input starts with any of the specified prefixes.
startsWith(Object, boolean, Collection<String>) - Static method in class org.klojang.util.StringMethods
Determines whether input starts with any of the specified prefixes.
stream() - Method in class org.klojang.util.collection.IntArrayList
 
stream() - Method in interface org.klojang.util.collection.IntList
Returns an IntStream of the elements in this list.
stringify(Object) - Static method in class org.klojang.util.ObjectMethods
Returns an empty string if the argument is null, else the result of calling toString() on the argument.
StringMethods - Class in org.klojang.util
Methods for working with strings.
sublist(List<T>, int, int) - Static method in class org.klojang.util.CollectionMethods
Returns a sublist of the provided list starting with element from and containing at most length elements.
substr(String, int) - Static method in class org.klojang.util.StringMethods
Substring method that facilitates substring retrieval relative to the end of a string.
substr(String, int, int) - Static method in class org.klojang.util.StringMethods
Substring method that facilitates substring retrieval relative to the end of a string as well as substring retrieval in the opposite direction.
substrAfter(Object, String, int) - Static method in class org.klojang.util.StringMethods
Returns the substring after the nth occurrence of the specified substring, or the entire string if there is no nth occurrence of the substring.
substrFrom(Object, String, int) - Static method in class org.klojang.util.StringMethods
Returns the substring from (and including) the nth occurrence of the specified substring, or the entire string if there is no nth occurrence of the substring.
substringBefore(Object, String, int) - Static method in class org.klojang.util.StringMethods
Returns the substring up to, but not including the nth occurrence of the specified substring, or the entire string if there is no nth occurrence of the substring.
substringOnTo(Object, String, int) - Static method in class org.klojang.util.StringMethods
Returns the substring up to, and including the nth occurrence of the specified substring, or the entire string if there is no nth occurrence of the substring.
swap(Map<K, V>) - Static method in class org.klojang.util.CollectionMethods
Returns a new Map where keys and values of the input map have traded places.
swap(Map<K, V>, Supplier<? extends Map<V, K>>) - Static method in class org.klojang.util.CollectionMethods
Returns a new Map where keys and values of the input map have traded places.
swapAndFreeze(Map<K, V>) - Static method in class org.klojang.util.CollectionMethods
Returns an unmodifiable Map where keys and values of the input map have traded places.

T

toArray() - Method in class org.klojang.util.collection.IntArrayList
 
toArray() - Method in interface org.klojang.util.collection.IntList
Converts the list to an int[] array.
toArray(int, int) - Method in class org.klojang.util.collection.IntArrayList
 
toArray(int, int) - Method in interface org.klojang.util.collection.IntList
Converts the list to an int[] array.
toClass() - Method in record class org.klojang.util.ArrayType
Returns the Class object corresponding to this ArrayType.
toClass(int) - Method in record class org.klojang.util.ArrayType
Returns the Class object corresponding to an ArrayType with the specified number of dimensions and with the same base type as this ArrayType.
toClass(Class<?>) - Method in record class org.klojang.util.ArrayType
Returns the Class object corresponding to an ArrayType with the specified base type and with the same number of dimensions as this ArrayType.
toEntry() - Method in record class org.klojang.util.AnyTuple2
Converts this instance to an immutable Map entry.
toEntry() - Method in record class org.klojang.util.Tuple2
Converts this instance to an immutable Map entry.
toGenericList() - Method in class org.klojang.util.collection.IntArrayList
 
toGenericList() - Method in interface org.klojang.util.collection.IntList
Converts this IntList to a fixed-size, mutable List<Integer>.
toGenericMap() - Method in class org.klojang.util.collection.EnumToIntMap
Returns an immutable, fully-generic version of this map.
toGrid(int[], int, int) - Static method in class org.klojang.util.MathMethods
Converts a one-dimensional array of values into zero or more grids of rows x cols cells.
toGrid(int[], int, int, int) - Static method in class org.klojang.util.MathMethods
Converts a one-dimensional array of values into zero or more grids of rows x cols cells.
toGrid(T[], int, int) - Static method in class org.klojang.util.MathMethods
Converts a one-dimensional array of values into zero or more grids of rows x cols cells.
toGrid(T[], int, int, T) - Static method in class org.klojang.util.MathMethods
Converts a one-dimensional array of values into zero or more grids of rows x cols cells.
toGridCM(int[], int, int) - Static method in class org.klojang.util.MathMethods
Converts a one-dimensional array of values into zero or more grids of rows x cols cells.
toGridCM(int[], int, int, int) - Static method in class org.klojang.util.MathMethods
Converts a one-dimensional array of values into zero or more grids of rows x cols cells.
toGridCM(T[], int, int) - Static method in class org.klojang.util.MathMethods
Converts a one-dimensional array of values into zero or more grids of rows x cols cells.
toGridCM(T[], int, int, T) - Static method in class org.klojang.util.MathMethods
Converts a one-dimensional array of values into zero or more grids of rows x cols cells.
toShortString(Object) - Static method in class org.klojang.util.StringMethods
Returns a short string representation of an object.
toShortString(Object, int) - Static method in class org.klojang.util.StringMethods
Returns a short string representation of an object.
toShortString(Object, int, int, int) - Static method in class org.klojang.util.StringMethods
Returns a short string representation of an object.
toString() - Method in record class org.klojang.util.AnyTuple2
Returns a string representation of this record class.
toString() - Method in record class org.klojang.util.ArrayType
Returns the simple class name of the array type encoded by this instance.
toString() - Method in class org.klojang.util.collection.EnumToIntMap
 
toString() - Method in class org.klojang.util.collection.IntArrayList
 
toString() - Method in class org.klojang.util.exception.ExceptionOrigin
toString() - Method in exception class org.klojang.util.exception.RootException
Calls toString() on the root exception.
toString() - Method in exception class org.klojang.util.exception.UncheckedException
Calls toString() on the wrapped exception.
toString() - Method in class org.klojang.util.MutableInt
Returns the string representation of the current value.
toString() - Method in record class org.klojang.util.Tuple2
Returns a string representation of this record class.
trim(int) - Method in class org.klojang.util.collection.IntArrayList
 
trim(int) - Method in interface org.klojang.util.collection.IntList
Trims the list to the specified size.
trim(Object, String) - Static method in class org.klojang.util.StringMethods
Left and right-trims the specified string.
Tuple2<T,U> - Record Class in org.klojang.util
Generic 2-tuple of arbitrarily typed, non-null objects.
Tuple2(T, U) - Constructor for record class org.klojang.util.Tuple2
Instantiates a new Tuple2.

U

unbox() - Method in record class org.klojang.util.ArrayType
Returns the Class object corresponding to an ArrayType equal to this ArrayType, but with the unboxed version of the base type.
unbox(Class<?>) - Static method in class org.klojang.util.ClassMethods
Returns the primitive type corresponding to the specified class if it is a wrapper class; else the class itself is returned.
unbox(Integer[]) - Static method in class org.klojang.util.ArrayMethods
Converts an Integer array to an int array.
unbox(Integer[], int) - Static method in class org.klojang.util.ArrayMethods
Converts an Integer array to an int array.
unboxed() - Method in record class org.klojang.util.ArrayType
Returns the ArrayType for the unboxed version of the base type.
uncheck(Throwable) - Static method in class org.klojang.util.ExceptionMethods
Returns the specified throwable if it already is a RuntimeException, else an UncheckedException wrapping the throwable.
uncheck(Throwable, String) - Static method in class org.klojang.util.ExceptionMethods
Returns the specified throwable if it already is a RuntimeException, else an UncheckedException wrapping the throwable.
UncheckedException - Exception Class in org.klojang.util.exception
A RuntimeException that behaves just like Exception it wraps.
UncheckedException(String, Throwable) - Constructor for exception class org.klojang.util.exception.UncheckedException
Creates an UncheckedException with the provided custom message, wrapping the provided Throwable.
UncheckedException(Throwable) - Constructor for exception class org.klojang.util.exception.UncheckedException
Creates an UncheckedException wrapping the provided Throwable.
unwrap() - Method in exception class org.klojang.util.exception.RootException
Returns the exception wrapped by this RootException.
unwrap() - Method in exception class org.klojang.util.exception.UncheckedException
Returns the exception wrapped by this UncheckedException.

V

valueOf(String) - Static method in enum class org.klojang.util.ResizeMethod
Returns the enum constant of this class with the specified name.
values() - Method in class org.klojang.util.collection.EnumToIntMap
Returns a Collection view of the values contained in this map.
values() - Static method in enum class org.klojang.util.ResizeMethod
Returns an array containing the constants of this enum class, in the order they are declared.

W

wrap(Throwable) - Static method in class org.klojang.util.ExceptionMethods
Returns the specified throwable if it already is a RuntimeException, else a RuntimeException wrapping the throwable.
wrap(Throwable, String, Object...) - Static method in class org.klojang.util.ExceptionMethods
Returns the specified throwable if it already is a RuntimeException, else a RuntimeException wrapping the throwable.
wrap(Throwable, BiFunction<String, Throwable, T>, String, Object...) - Static method in class org.klojang.util.ExceptionMethods
Returns the specified throwable if it already is a RuntimeException, else a RuntimeException produced by the specified function.
wrap(Throwable, Function<Throwable, T>) - Static method in class org.klojang.util.ExceptionMethods
Returns the specified throwable if it already is a RuntimeException, else the RuntimeException returned by the specified function.
write(String, String) - Static method in class org.klojang.util.IOMethods
Simple file-write method.
A B C D E F G H I K L M N O P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form