Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/apache/commons-lang
/ functions
Functions
9,093 in github.com/apache/commons-lang
⨍
Functions
9,093
◇
Types & classes
1,098
↓ 81 callers
Method
shuffle
Shuffles randomly the elements of the specified array using the <a href="https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle">Fisher-Yates shuf
src/main/java/org/apache/commons/lang3/ArrayUtils.java:7777
↓ 81 callers
Method
size
Returns the number of bits of space actually in use by this {@link BitSet} to represent bit values. The maximum element in the set is the size - 1st e
src/main/java/org/apache/commons/lang3/util/FluentBitSet.java:530
↓ 80 callers
Method
assertDate
(final Date date, final int year, final int month, final int day, final int hour, final int min, final int sec
src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java:253
↓ 80 callers
Method
min
Null safe comparison of Comparables. <p> TODO Move to ComparableUtils. </p> @param <T> type of the values processed by this method @param values t
src/main/java/org/apache/commons/lang3/ObjectUtils.java:1100
↓ 79 callers
Method
readField
Reads an accessible {@link Field}. @param field the field to use. @param target the object to call on, may be {@code null} for
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java:379
↓ 78 callers
Method
andThen
Returns a composed {@link TriConsumer} that performs, in sequence, this operation followed by the {@code after} operation. If performing either operat
src/main/java/org/apache/commons/lang3/function/TriConsumer.java:62
↓ 77 callers
Method
clear
Clears the string builder (convenience Collections API style method). <p> This method does not reduce the size of the internal character buffer. To do
src/main/java/org/apache/commons/lang3/text/StrBuilder.java:1615
↓ 77 callers
Method
compareIsNumberWithCreateNumber
(final String val, final boolean expected)
src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java:87
↓ 77 callers
Method
indexOf
Finds the first index within a CharSequence, handling {@code null}. This method uses {@link String#indexOf(String, int)} if possible. <p> A {@code nu
src/main/java/org/apache/commons/lang3/StringUtils.java:2572
↓ 77 callers
Method
ordinalIndexOf
Finds the n-th index within a CharSequence, handling {@code null}. This method uses {@link String#indexOf(String)} if possible. <p> <strong>Note:</str
src/main/java/org/apache/commons/lang3/StringUtils.java:5547
↓ 76 callers
Method
getField
Gets an accessible {@link Field} by name respecting scope. Superclasses/interfaces will be considered. @param cls the {@link Class} to ref
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java:156
↓ 75 callers
Method
add
()
src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderMutateInspectConcurrencyTest.java:83
↓ 75 callers
Method
lastIndexOf
Finds the last index within a CharSequence, handling {@code null}. This method uses {@link String#lastIndexOf(String)} if possible. <p> A {@code null
src/main/java/org/apache/commons/lang3/StringUtils.java:4835
↓ 75 callers
Method
min
Returns the minimum value in an array. @param array an array, must not be null or empty. @return the minimum value in the array. @throws NullPointerE
src/main/java/org/apache/commons/lang3/math/NumberUtils.java:988
↓ 75 callers
Method
reverse
Reverses the order of the given array. <p> This method does nothing for a {@code null} input array. </p> @param array the array to reverse, may be {
src/main/java/org/apache/commons/lang3/ArrayUtils.java:6697
↓ 73 callers
Method
ceiling
Gets a date ceiling, leaving the field specified as the most significant field. <p>For example, if you had the date-time of 28 Mar 2002 13:45:01.231,
src/main/java/org/apache/commons/lang3/time/DateUtils.java:350
↓ 72 callers
Method
indexOf
Finds the first index within a CharSequence, handling {@code null}. This method uses {@link String#indexOf(String, int)} if possible. <p> A {@code nu
src/main/java/org/apache/commons/lang3/Strings.java:831
↓ 72 callers
Method
invokeMethod
Invokes a named method without parameters. <p> This is a convenient wrapper for {@link #invokeMethod(Object object, boolean forceAccess, String metho
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java:781
↓ 71 callers
Method
clear
Sets all of the bits in this BitSet to {@code false}. @return {@code this} instance.
src/main/java/org/apache/commons/lang3/util/FluentBitSet.java:145
↓ 70 callers
Method
getLength
Gets the length of the specified array. This method handles {@link Object} arrays and primitive arrays. <p> If the input array is {@code null}, {@code
src/main/java/org/apache/commons/lang3/ArrayUtils.java:2181
↓ 70 callers
Method
getSimpleName
Null-safe version of {@code cls.getSimpleName()} @param cls the class for which to get the simple name; may be null. @return the simple class name or
src/main/java/org/apache/commons/lang3/ClassUtils.java:1135
↓ 70 callers
Method
toBoolean
Converts a Boolean to a boolean handling {@code null} by returning {@code false}. <pre> BooleanUtils.toBoolean(Boolean.TRUE) = true BooleanUtils
src/main/java/org/apache/commons/lang3/BooleanUtils.java:399
↓ 68 callers
Method
abbreviate
Abbreviates a String using ellipses. This will convert "Now is the time for all good men" into "Now is the time for..." <p> Specifically: </p> <ul> <
src/main/java/org/apache/commons/lang3/StringUtils.java:237
↓ 68 callers
Method
setThrowable
(final Throwable throwable)
src/test/java/org/apache/commons/lang3/function/FailableTest.java:220
↓ 68 callers
Method
truncate
Truncates a String. This will turn "Now is the time for all good men" into "Now is the time for". <p> Specifically: </p> <ul> <li>If {@code str} is l
src/main/java/org/apache/commons/lang3/StringUtils.java:8953
↓ 67 callers
Method
requireNonNull
Checks that the specified object reference is not {@code null} and throws a customized {@link InvalidObjectException} if it is. This method is designe
src/main/java/org/apache/commons/lang3/SerializationUtils.java:223
↓ 65 callers
Method
appendSuper
Adds the result of {@code super.equals()} to this builder. @param superEquals the result of calling {@code super.equals()} @return {@code this} inst
src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java:883
↓ 65 callers
Method
containsAny
Tests if the CharSequence contains any character in the given set of characters. <p> A {@code null} CharSequence will return {@code false}. A {@code
src/main/java/org/apache/commons/lang3/StringUtils.java:1075
↓ 65 callers
Method
processBitVectors
Convert a {@code long[]} created by {@link EnumUtils#generateBitVectors} into the set of enum values that it represents. <p>If you store this value,
src/main/java/org/apache/commons/lang3/EnumUtils.java:444
↓ 64 callers
Method
booleanValue
Returns the value of this MutableBoolean as a boolean. @return the boolean value represented by this object.
src/main/java/org/apache/commons/lang3/mutable/MutableBoolean.java:80
↓ 64 callers
Method
getCanonicalName
Gets the canonical class name for a {@link Class}. @param cls the class for which to get the canonical class name; may be null. @return the canonical
src/main/java/org/apache/commons/lang3/ClassUtils.java:431
↓ 64 callers
Method
getInstance
Gets a formatter instance using the default pattern in the default locale. @return a date/time formatter.
src/main/java/org/apache/commons/lang3/time/FastDateFormat.java:234
↓ 64 callers
Method
toBaseString
Create the same toString() as Object.toString(). @param o the object to create the string for. @return a String in the Object.toString format.
src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java:1174
↓ 63 callers
Method
append
Handles the common {@link Formattable} operations of truncate-pad-append, with no ellipsis on precision overflow, and padding width underflow with spa
src/main/java/org/apache/commons/lang3/text/FormattableUtils.java:59
↓ 63 callers
Method
between
Creates a range with the specified minimum and maximum values (both inclusive). <p>The range uses the natural ordering of the elements to determine w
src/main/java/org/apache/commons/lang3/Range.java:83
↓ 62 callers
Method
equals
Compares this range to another object to test if they are equal. <p>To be equal, the minimum and maximum values must be equal, which ignores any diff
src/main/java/org/apache/commons/lang3/Range.java:310
↓ 62 callers
Method
getTimeZone
Delegates to {@link TimeZone#getTimeZone(String)}, on Java 25 and up, maps an ID if it's a key in {@link ZoneId#SHORT_IDS}. <p> On Java 25, calling {@
src/main/java/org/apache/commons/lang3/time/TimeZones.java:76
↓ 62 callers
Method
toLocale
Returns the given locale if non-{@code null}, otherwise {@link Locale#getDefault()}. @param locale a locale or {@code null}. @return the given locale
src/main/java/org/apache/commons/lang3/LocaleUtils.java:372
↓ 60 callers
Method
hasNext
Checks whether there are any more tokens. @return true if there are more tokens.
src/main/java/org/apache/commons/lang3/text/StrTokenizer.java:572
↓ 60 callers
Method
reflectionToString
Uses {@link ReflectionToStringBuilder} to generate a {@code toString} for the specified object. @param object the Object to be output @return the St
src/main/java/org/apache/commons/lang3/builder/ToStringBuilder.java:199
↓ 60 callers
Method
start
()
src/test/java/org/apache/commons/lang3/ThreadUtilsTest.java:75
↓ 60 callers
Method
toBooleanObject
Converts an int to a Boolean using the convention that {@code zero} is {@code false}, everything else is {@code true}. <pre> BooleanUtils.toBoolean
src/main/java/org/apache/commons/lang3/BooleanUtils.java:587
↓ 59 callers
Method
assertEqualsIfAccessible
(final Object expected, final Object actual)
src/test/java/org/apache/commons/lang3/builder/AbstractBuilderTest.java:43
↓ 59 callers
Method
getInstance
(final String format)
src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java:204
↓ 59 callers
Method
is
Creates a new {@link ComparableCheckBuilder}. @param a base object in the further comparison @param <A> type of the base object @return a builder obj
src/main/java/org/apache/commons/lang3/compare/ComparableUtils.java:182
↓ 59 callers
Method
stringMatcher
Creates a matcher for a string. @param str the string to match, null or empty matches nothing. @return a new Matcher for the given String.
src/main/java/org/apache/commons/lang3/text/StrMatcher.java:362
↓ 58 callers
Method
formatPeriod
Formats the time gap as a string, using the specified format. Padding the left-hand side side of numbers with zeroes is optional. @param startMillis
src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java:502
↓ 58 callers
Method
invokeStaticMethod
Invokes a named {@code static} method whose parameter type matches the object type. <p> This method delegates the method search to {@link #getMatchin
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java:1004
↓ 58 callers
Method
replace
Replaces a portion of the string builder with another string. The length of the inserted string does not have to match the removed length. @param sta
src/main/java/org/apache/commons/lang3/text/StrBuilder.java:2549
↓ 57 callers
Method
charMatcher
Creates a matcher from a character. @param ch the character to match, must not be null. @return a new Matcher for the given char.
src/main/java/org/apache/commons/lang3/text/StrMatcher.java:256
↓ 57 callers
Method
getDiffs
Gets an unmodifiable list of {@link Diff}s. The list may be empty if there were no differences between the objects. @return an unmodifiable list of {
src/main/java/org/apache/commons/lang3/builder/DiffResult.java:85
↓ 57 callers
Method
isPublic
Tests whether a {@link Class} is public. @param cls Class to test. @return {@code true} if {@code cls} is public. @since 3.13.0
src/main/java/org/apache/commons/lang3/ClassUtils.java:1539
↓ 56 callers
Method
charAt
(final int index)
src/test/java/org/apache/commons/lang3/CharSequenceUtilsTest.java:118
↓ 56 callers
Method
insert
Inserts the value into this builder. @param index the index to add at, must be valid. @param value the value to insert. @return {@code this} instan
src/main/java/org/apache/commons/lang3/text/StrBuilder.java:2111
↓ 56 callers
Method
isBeforeRange
Checks whether this range is completely before the specified range. <p>This method may fail if the ranges have two different comparators or element t
src/main/java/org/apache/commons/lang3/Range.java:471
↓ 56 callers
Method
max0
(final int other)
src/main/java/org/apache/commons/lang3/ArrayUtils.java:4581
↓ 56 callers
Method
replace
Replaces all the occurrences of variables in the given source object with their matching values from the map. @param <V> The type of the values in th
src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java:182
↓ 56 callers
Method
toObject
Converts an array of primitive booleans to objects. <p>This method returns {@code null} for a {@code null} input array.</p> @param array a {@code b
src/main/java/org/apache/commons/lang3/ArrayUtils.java:9045
↓ 55 callers
Method
getAnnotation
Gets the annotation object with the given annotation type that is present on the given method or optionally on any equivalent method in super classes
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java:270
↓ 55 callers
Method
getShortCanonicalName
Gets the canonical name minus the package name from a {@link Class}. @param cls the class for which to get the short canonical class name; may be nul
src/main/java/org/apache/commons/lang3/ClassUtils.java:898
↓ 55 callers
Method
join
(final boolean[] array, final char delimiter, final int startIndex, final int endIndex)
src/test/java/org/apache/commons/lang3/StringUtilsJoinBenchmark.java:376
↓ 54 callers
Method
concat
Concatenates multiple boolean arrays into a single array. <p> This method combines all input arrays in the order they are provided, creating a new arr
src/main/java/org/apache/commons/lang3/ArrayUtils.java:1621
↓ 54 callers
Method
getLeft
()
src/test/java/org/apache/commons/lang3/builder/DiffTest.java:37
↓ 54 callers
Method
getRight
()
src/test/java/org/apache/commons/lang3/builder/DiffTest.java:42
↓ 54 callers
Method
removeAllOccurences
Removes the occurrences of the specified element from the specified boolean array. <p> All subsequent elements are shifted to the left (subtracts one
src/main/java/org/apache/commons/lang3/ArrayUtils.java:5621
↓ 54 callers
Method
removeAllOccurrences
Removes the occurrences of the specified element from the specified boolean array. <p> All subsequent elements are shifted to the left (subtracts one
src/main/java/org/apache/commons/lang3/ArrayUtils.java:5792
↓ 54 callers
Method
toString
Builds a {@code toString} value using the default {@link ToStringStyle} through reflection. <p> It uses {@code AccessibleObject.setAccessible} to gai
src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java:154
↓ 53 callers
Method
append
Appends to the {@code toString} a {@code boolean} value. @param value the value to add to the {@code toString} @return {@code this} instance.
src/main/java/org/apache/commons/lang3/builder/ToStringBuilder.java:338
↓ 53 callers
Method
getLevenshteinDistance
Gets the Levenshtein distance between two Strings. <p> This is the number of changes needed to change one String into another, where each change is a
src/main/java/org/apache/commons/lang3/StringUtils.java:2320
↓ 53 callers
Method
getShortClassName
Gets the class name minus the package name from a {@link Class}. @param cls the class to get the short name for. @return the class name without the p
src/main/java/org/apache/commons/lang3/ClassUtils.java:1020
↓ 52 callers
Method
is
Constructs a {@link CharRange} over a single character. @param ch only character in this range. @return the new CharRange object. @since 2.5
src/main/java/org/apache/commons/lang3/CharRange.java:156
↓ 52 callers
Method
isArray
Tests whether the given object is an Object array or a primitive array in a null-safe manner. <p> A {@code null} {@code object} Object will return {@
src/main/java/org/apache/commons/lang3/ObjectUtils.java:925
↓ 52 callers
Method
isIn
Constructs a {@link CharRange} over a set of characters. <p>If start and end are in the wrong order, they are reversed. Thus {@code a-e} is the same
src/main/java/org/apache/commons/lang3/CharRange.java:171
↓ 52 callers
Method
replaceAll
Replaces each substring of the text String that matches the given regular expression pattern with the given replacement. This method is a {@code null
src/main/java/org/apache/commons/lang3/RegExUtils.java:416
↓ 51 callers
Method
and
Returns a composed {@link FailablePredicate} like {@link Predicate#and(Predicate)}. @param other a predicate that will be logically-ANDed with this p
src/main/java/org/apache/commons/lang3/function/FailablePredicate.java:72
↓ 51 callers
Method
length
Returns the "logical size" of this {@link BitSet}: the index of the highest set bit in the {@link BitSet} plus one. Returns zero if the {@link BitSet}
src/main/java/org/apache/commons/lang3/util/FluentBitSet.java:310
↓ 50 callers
Method
isTrue
Validate that the argument condition is {@code true}; otherwise throwing an exception. This method is useful when validating according to an arbitrary
src/main/java/org/apache/commons/lang3/Validate.java:497
↓ 49 callers
Method
compareTo
(final MyComparable o)
src/test/java/org/apache/commons/lang3/compare/ComparableUtilsTest.java:447
↓ 49 callers
Method
contains
Tests whether this {@link CharSet} contain the specified character {@code ch}. <p> Examples using the negation character: </p> <pre> CharSet.getIn
src/main/java/org/apache/commons/lang3/CharSet.java:239
↓ 49 callers
Method
containsNone
Tests that the CharSequence does not contain certain characters. <p> A {@code null} CharSequence will return {@code true}. A {@code null} invalid cha
src/main/java/org/apache/commons/lang3/StringUtils.java:1245
↓ 49 callers
Method
wrap
Wraps a string with a char. <pre> StringUtils.wrap(null, ) = null StringUtils.wrap("", ) = "" StringUtils.wrap("ab", '\0') = "ab"
src/main/java/org/apache/commons/lang3/StringUtils.java:9223
↓ 48 callers
Method
binaryBeMsb0ToHexDigit
Converts the first 4 bits of a binary (represented as boolean array) in big-endian MSB0 bit ordering to a hexadecimal digit. <p> (1, 0, 0, 0) is conv
src/main/java/org/apache/commons/lang3/Conversion.java:93
↓ 48 callers
Method
getInstance
(final String format)
src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java:83
↓ 48 callers
Method
or
Returns a composed {@link FailablePredicate} like {@link Predicate#and(Predicate)}. @param other a predicate that will be logically-ORed with this pr
src/main/java/org/apache/commons/lang3/function/FailablePredicate.java:93
↓ 48 callers
Method
writeField
Writes an accessible {@link Field}. @param field to write. @param target the object to call on, may be {@code null} for {@code
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java:743
↓ 47 callers
Method
readDeclaredField
Reads the named {@code public} {@link Field}. Only the class of the specified object will be considered. @param target the object to refle
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java:280
↓ 47 callers
Method
singletonArray
(final Class<?> c)
src/test/java/org/apache/commons/lang3/reflect/MethodUtilsTest.java:558
↓ 47 callers
Method
splitPreserveAllTokens
Splits the provided text into an array, using whitespace as the separator, preserving all tokens, including empty tokens created by adjacent separator
src/main/java/org/apache/commons/lang3/StringUtils.java:7531
↓ 47 callers
Method
substring
Extracts a portion of this string builder as a string. @param start the start index, inclusive, must be valid. @return the new string. @throws Index
src/main/java/org/apache/commons/lang3/text/StrBuilder.java:2939
↓ 47 callers
Method
toInstant
Returns the given non-null instant, or {@link Instant#EPOCH} if null. @param instant the instant to test, may be null. @return the given non-null ins
src/main/java/org/apache/commons/lang3/time/Instants.java:62
↓ 46 callers
Method
addAll
Adds all the elements of the given arrays into a new array. <p> The new array contains all of the element of {@code array1} followed by all of the ele
src/main/java/org/apache/commons/lang3/ArrayUtils.java:874
↓ 46 callers
Method
getValue
Gets the value of this mutable. @return the stored value. @deprecated Use {@link #get()}.
src/main/java/org/apache/commons/lang3/mutable/Mutable.java:55
↓ 46 callers
Method
wrap
Wraps a single line of text, identifying words by {@code ' '}. <p>New lines will be separated by the system property line separator. Very long words,
src/main/java/org/apache/commons/lang3/text/WordUtils.java:488
↓ 45 callers
Method
getCharRanges
Gets the set of character ranges. <p> Package private for testing. </p> @return the set of character ranges.
src/main/java/org/apache/commons/lang3/CharSet.java:276
↓ 45 callers
Method
map
Maps the given instances as unchecked. @param <T> The result type returned by the Futures' {@link #get()} and {@link #get(long, TimeUnit)} methods. @
src/main/java/org/apache/commons/lang3/concurrent/UncheckedFuture.java:47
↓ 45 callers
Method
removeElement
Removes the first occurrence of the specified element from the specified array. All subsequent elements are shifted to the left (subtracts one from th
src/main/java/org/apache/commons/lang3/ArrayUtils.java:5998
↓ 44 callers
Method
count
Takes an argument in set-syntax, see evaluateSet, and returns the number of characters present in the specified string. <pre> CharSetUtils.count(null
src/main/java/org/apache/commons/lang3/CharSetUtils.java:85
↓ 44 callers
Method
equals
Checks if two annotations are equal using the criteria for equality presented in the {@link Annotation#equals(Object)} API docs. @param a1 the first
src/main/java/org/apache/commons/lang3/AnnotationUtils.java:197
↓ 44 callers
Method
getGmtTimeZone
Gets the GMT TimeZone. @return A TimeZone with a raw offset of zero.
src/main/java/org/apache/commons/lang3/time/FastTimeZone.java:40
↓ 44 callers
Method
replaceFirst
Replaces the first substring of the text string that matches the given regular expression pattern with the given replacement. This method is a {@code
src/main/java/org/apache/commons/lang3/RegExUtils.java:552
← previous
next →
101–200 of 9,093, ranked by callers