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
↓ 15 callers
Method
shortToBinary
Converts a short into an array of boolean using the default (little-endian, LSB0) byte and bit ordering. @param src the short to convert. @param s
src/main/java/org/apache/commons/lang3/Conversion.java:1290
↓ 15 callers
Method
startsWithIgnoreCase
Case-insensitive check if a CharSequence starts with a specified prefix. <p> {@code null}s are handled without exceptions. Two {@code null} reference
src/main/java/org/apache/commons/lang3/StringUtils.java:7878
↓ 15 callers
Method
toChar
Converts the Character to a char throwing an exception for {@code null}. <pre> CharUtils.toChar(' ') = ' ' CharUtils.toChar('A') = 'A' CharUt
src/main/java/org/apache/commons/lang3/CharUtils.java:338
↓ 15 callers
Method
toCharacterObject
Delegates to {@link Character#valueOf(char)}. @param c the character to convert @return a {@code Character} representing {@code c}. @deprecated Use {
src/main/java/org/apache/commons/lang3/CharUtils.java:406
↓ 15 callers
Method
toMillisInt
Converts a Duration to milliseconds bound to an {@code int} (instead of a {@code long}). <p> Handy for low-level APIs that take millisecond timeouts i
src/main/java/org/apache/commons/lang3/time/DurationUtils.java:253
↓ 15 callers
Method
trimMatcher
Gets the matcher to String trim() whitespace characters. @return the trim matcher.
src/main/java/org/apache/commons/lang3/text/StrMatcher.java:383
↓ 15 callers
Method
writeObject
Writes {@code null} in place of the listener array, simulating a malicious or corrupt stream.
src/test/java/org/apache/commons/lang3/event/EventListenerSupportReadObjectTest.java:86
↓ 14 callers
Method
abbreviateMiddle
Abbreviates a String to the length passed, replacing the middle characters with the supplied replacement String. <p> This abbreviation only occurs if
src/main/java/org/apache/commons/lang3/StringUtils.java:427
↓ 14 callers
Method
apply
Applies a function and rethrows any exception as a {@link RuntimeException}. @param function the function to apply @param input1 the first input to a
src/main/java/org/apache/commons/lang3/Functions.java:325
↓ 14 callers
Method
assertEscapeJava
(final String escaped, final String original)
src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java:61
↓ 14 callers
Method
endsWith
Tests if a CharSequence ends with a specified suffix. <p> Case-sensitive examples </p> <pre> Strings.CS.endsWith(null, null) = true Strings.CS.
src/main/java/org/apache/commons/lang3/Strings.java:622
↓ 14 callers
Method
endsWith
Checks whether this builder ends with the specified string. <p> Note that this method handles null input quietly, unlike String. </p> @param str the
src/main/java/org/apache/commons/lang3/text/StrBuilder.java:1824
↓ 14 callers
Method
getDateTimeInstance
Gets a date/time formatter instance using the specified style in the default time zone and locale. @param dateStyle date style: {@link #FULL}, {@link
src/main/java/org/apache/commons/lang3/time/FastDateFormat.java:183
↓ 14 callers
Method
getStackTrace
Gets the stack trace from a Throwable as a String, including suppressed and cause exceptions. <p> The result of this method vary by JDK version as th
src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java:466
↓ 14 callers
Method
hashCode
Gets a hash code for an array handling multidimensional arrays. <p> Multi-dimensional primitive arrays are also handled by this method. </p> @param a
src/main/java/org/apache/commons/lang3/ArrayUtils.java:2195
↓ 14 callers
Method
isOctal
Tests if the given char is an octal digit. Octal digits are the character representations of the digits 0 to 7. @param ch the byte to check. @return
src/main/java/org/apache/commons/lang3/CharUtils.java:310
↓ 14 callers
Method
multiplyBy
Multiplies the value of this fraction by another, returning the result in reduced form. @param fraction the fraction to multiply by, must not be {@c
src/main/java/org/apache/commons/lang3/math/Fraction.java:765
↓ 14 callers
Method
nextToken
Gets the next token from the String. Equivalent to {@link #next()} except it returns null rather than throwing {@link NoSuchElementException} when no
src/main/java/org/apache/commons/lang3/text/StrTokenizer.java:660
↓ 14 callers
Method
notNull
Validate that the specified argument is not {@code null}; otherwise throwing an exception. <pre>Validate.notNull(myObject, "The object must not be nu
src/main/java/org/apache/commons/lang3/Validate.java:1042
↓ 14 callers
Method
now
(final FailableConsumer<Instant, E> nowConsumer)
src/main/java/org/apache/commons/lang3/time/DurationUtils.java:153
↓ 14 callers
Method
of
Obtains an immutable triple of three objects inferring the generic types. @param <L> The left element type. @param <M> The middle element type. @para
src/main/java/org/apache/commons/lang3/tuple/Triple.java:79
↓ 14 callers
Method
processBitVector
Convert a long value created by {@link EnumUtils#generateBitVector} into the set of enum values that it represents. <p>If you store this value, bewar
src/main/java/org/apache/commons/lang3/EnumUtils.java:426
↓ 14 callers
Method
randomInt
Generates a random int between 0 (inclusive) and {@link Integer#MAX_VALUE} ({@value Integer#MAX_VALUE} exclusive). @return the random integer. @see #
src/main/java/org/apache/commons/lang3/RandomUtils.java:387
↓ 14 callers
Method
read
(final CharBuffer cb)
src/test/java/org/apache/commons/lang3/text/StrBuilderTest.java:56
↓ 14 callers
Method
removeEnd
Removes a substring only if it is at the end of a source string, otherwise returns the source string. <p> A {@code null} source string will return {@
src/main/java/org/apache/commons/lang3/StringUtils.java:5864
↓ 14 callers
Method
replaceOnce
Replaces a String with another String inside a larger String, once. <p> A {@code null} reference passed to this method is a no-op. </p> <pre> String
src/main/java/org/apache/commons/lang3/StringUtils.java:6781
↓ 14 callers
Method
replaceOnceIgnoreCase
Case insensitively replaces a String with another String inside a larger String, once. <p> A {@code null} reference passed to this method is a no-op.
src/main/java/org/apache/commons/lang3/StringUtils.java:6813
↓ 14 callers
Method
selectNumberRule
Gets an appropriate rule for the padding required. @param field the field to get a rule for. @param padding the padding required. @return a new rul
src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java:1555
↓ 14 callers
Method
split
Splits the time. <p> This method sets the stop time of the watch to allow a time to be extracted. The start time is unaffected, enabling {@link #unsp
src/main/java/org/apache/commons/lang3/time/StopWatch.java:688
↓ 14 callers
Method
subSequence
{@inheritDoc} @since 3.0
src/main/java/org/apache/commons/lang3/text/StrBuilder.java:2918
↓ 14 callers
Method
substitute
Internal method that substitutes the variables. <p> Most users of this class do not need to call this method. This method will be called automatically
src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java:1098
↓ 14 callers
Method
substringsBetween
Searches a String for substrings delimited by a start and end tag, returning all matching substrings in an array. <p> A {@code null} input String ret
src/main/java/org/apache/commons/lang3/StringUtils.java:8655
↓ 14 callers
Method
testSdfAndFdp
(final TriFunction<String, TimeZone, Locale, DateParser> dbProvider, final String format, final String
src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java:628
↓ 14 callers
Method
toArray
Returns a {@link Collector} that accumulates the input elements into a new array. @param elementType Type of an element in the array. @param <O> The
src/main/java/org/apache/commons/lang3/Streams.java:566
↓ 14 callers
Method
toLong
Converts a {@link String} to a {@code long}, returning {@code zero} if the conversion fails. <p> If the string is {@code null}, {@code zero} is retur
src/main/java/org/apache/commons/lang3/math/NumberUtils.java:1462
↓ 14 callers
Method
toString
(final Object object)
src/test/java/org/apache/commons/lang3/builder/MultilineRecursiveToStringStyleTest.java:305
↓ 14 callers
Method
translate
{@inheritDoc}
src/main/java/org/apache/commons/lang3/text/translate/NumericEntityUnescaper.java:106
↓ 14 callers
Method
unescapeCsv
Returns a {@link String} value for an unescaped CSV column. <p>If the value is enclosed in double quotes, and contains a comma, newline or double
src/main/java/org/apache/commons/lang3/StringEscapeUtils.java:681
↓ 14 callers
Method
values
Returns an unmodifiable list of Booleans {@code [false, true]}. @return an unmodifiable list of Booleans {@code [false, true]}. @since 3.13.0
src/main/java/org/apache/commons/lang3/BooleanUtils.java:1153
↓ 13 callers
Method
acceptReadLocked
Provides read (shared, non-exclusive) access to The object to protect. More precisely, what the method will do (in the given order): <ol> <li>Obtain
src/main/java/org/apache/commons/lang3/concurrent/locks/LockingVisitors.java:309
↓ 13 callers
Method
addExact
Safely adds the length of an array to a running total, checking for overflow. @param totalLength the current accumulated length @param array the arra
src/main/java/org/apache/commons/lang3/ArrayUtils.java:1172
↓ 13 callers
Method
clearShort
Clears the bits. @param holder the short data containing the bits we're interested in. @return the value of holder with the specified bits cleared (s
src/main/java/org/apache/commons/lang3/BitField.java:137
↓ 13 callers
Method
collect
Delegates to {@link Stream#collect(Collector)} for a Stream on the given array. @param <T> The type of the array elements. @param <R> the
src/main/java/org/apache/commons/lang3/stream/LangCollectors.java:110
↓ 13 callers
Method
createChildBackgroundInitializer
An overrideable method to create concrete implementations of {@code BackgroundInitializer} used for defining background tasks for {@code MultiBackgrou
src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java:217
↓ 13 callers
Method
filter
Returns a FailableStream consisting of the elements of this stream that match the given FailablePredicate. <p> This is an intermediate operation. </p>
src/main/java/org/apache/commons/lang3/stream/Streams.java:363
↓ 13 callers
Method
getActiveExecutor
Gets the {@link ExecutorService} that is actually used for executing the background task. This method can be called after {@link #start()} (before {@c
src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java:280
↓ 13 callers
Method
getArrayEnd
Gets the array end text. @return the current array end text.
src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java:1809
↓ 13 callers
Method
getArrayStart
Gets the array start text. @return the current array start text.
src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java:1827
↓ 13 callers
Method
getMethodsWithAnnotation
Gets all class level public methods of the given class that are annotated with the given annotation. @param cls the {@link Class} to query.
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java:520
↓ 13 callers
Method
hash
(final Object value1, final Object value2)
src/main/java/org/apache/commons/lang3/Range.java:112
↓ 13 callers
Method
hexToByte
Converts a hexadecimal string into a byte using the default (little-endian, LSB0) byte and bit ordering. @param src the hexadecimal string to con
src/main/java/org/apache/commons/lang3/Conversion.java:748
↓ 13 callers
Method
insecure
Gets the singleton instance based on {@link ThreadLocalRandom#current()}; <b>which is not cryptographically secure</b>; for more secure processing use
src/main/java/org/apache/commons/lang3/RandomStringUtils.java:118
↓ 13 callers
Method
invoke
(final Object proxy, final Method method, final Object[] args)
src/test/java/org/apache/commons/lang3/event/EventListenerSupportTest.java:203
↓ 13 callers
Method
isAllLowerCase
Tests if the CharSequence contains only lowercase characters. <p> {@code null} will return {@code false}. An empty CharSequence (length()=0) will ret
src/main/java/org/apache/commons/lang3/StringUtils.java:3236
↓ 13 callers
Method
isAllUpperCase
Tests if the CharSequence contains only uppercase characters. <p>{@code null} will return {@code false}. An empty String (length()=0) will return {@c
src/main/java/org/apache/commons/lang3/StringUtils.java:3273
↓ 13 callers
Method
isAlpha
Tests if the CharSequence contains only Unicode letters. <p> {@code null} will return {@code false}. An empty CharSequence (length()=0) will return {
src/main/java/org/apache/commons/lang3/StringUtils.java:3309
↓ 13 callers
Method
isAlphaSpace
Tests if the CharSequence contains only Unicode letters and space (' '). <p> {@code null} will return {@code false} An empty CharSequence (length()=0
src/main/java/org/apache/commons/lang3/StringUtils.java:3418
↓ 13 callers
Method
isAlphanumeric
Tests if the CharSequence contains only Unicode letters or digits. <p> {@code null} will return {@code false}. An empty CharSequence (length()=0) wil
src/main/java/org/apache/commons/lang3/StringUtils.java:3346
↓ 13 callers
Method
isAsciiAlpha
Tests whether the character is ASCII 7 bit alphabetic. <pre> CharUtils.isAsciiAlpha('a') = true CharUtils.isAsciiAlpha('A') = true CharUtils.
src/main/java/org/apache/commons/lang3/CharUtils.java:111
↓ 13 callers
Method
isEquals
Returns {@code true} if the fields that have been checked are all equal. @return boolean
src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java:911
↓ 13 callers
Method
isInstance
Tests if the given value can be assigned to the target type following the Java generics rules. @param value the value to be checked. @param type the
src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java:1298
↓ 13 callers
Method
isShutdown
Tests whether the {@link #shutdown()} method has been called on this object. If this method returns <strong>true</strong>, this instance cannot be use
src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java:417
↓ 13 callers
Method
isSuspended
Tests whether this StopWatch is suspended. @return boolean If this StopWatch is suspended. @since 3.2
src/main/java/org/apache/commons/lang3/time/StopWatch.java:602
↓ 13 callers
Method
join0
(final Object... objects)
src/test/java/org/apache/commons/lang3/stream/LangCollectorsTest.java:62
↓ 13 callers
Method
join1
(final Object... objects)
src/test/java/org/apache/commons/lang3/stream/LangCollectorsTest.java:66
↓ 13 callers
Method
join3
(final Object... objects)
src/test/java/org/apache/commons/lang3/stream/LangCollectorsTest.java:70
↓ 13 callers
Method
removeEndIgnoreCase
Case-insensitive removal of a substring if it is at the end of a source string, otherwise returns the source string. <p> A {@code null} source string
src/main/java/org/apache/commons/lang3/StringUtils.java:5895
↓ 13 callers
Method
replacePattern
Replaces each substring of the source String that matches the given regular expression with the given replacement using the {@link Pattern#DOTALL} opt
src/main/java/org/apache/commons/lang3/StringUtils.java:6857
↓ 13 callers
Method
requireNonEmpty
Checks that the specified object reference is not {@code null} or empty per {@link #isEmpty(Object)}. Use this method for validation, for example: <p
src/main/java/org/apache/commons/lang3/ObjectUtils.java:1185
↓ 13 callers
Method
setInitializer
Sets the initializer supplier called by {@link #initialize()}. @param initializer the supplier called by {@link #initialize()}. @return {@code this}
src/main/java/org/apache/commons/lang3/concurrent/AbstractConcurrentInitializer.java:99
↓ 13 callers
Method
shortToByteArray
Converts a short into an array of byte using the default (little-endian, LSB0) byte and bit ordering. @param src the short to convert. @param srcP
src/main/java/org/apache/commons/lang3/Conversion.java:1318
↓ 13 callers
Method
splitByCharacterType
Splits a String by Character type as returned by {@link Character#getType(int)}. Groups of contiguous characters of the same type are returned as comp
src/main/java/org/apache/commons/lang3/StringUtils.java:7238
↓ 13 callers
Method
startsWith
Tests whether the given data array starts with an expected array, for example, signature bytes. <p> If both arrays are null, the method returns true.
src/main/java/org/apache/commons/lang3/ArrayUtils.java:8097
↓ 13 callers
Method
toCalendar
Converts a {@link Date} into a {@link Calendar}. @param date the date to convert to a Calendar. @return the created Calendar. @throws NullPointerExce
src/main/java/org/apache/commons/lang3/time/DateUtils.java:1612
↓ 13 callers
Method
toClass
Converts an array of {@link Object} in to an array of {@link Class} objects. If any of these objects is null, a null element will be inserted into the
src/main/java/org/apache/commons/lang3/ClassUtils.java:1588
↓ 13 callers
Method
toStringInclude
Builds a String for a toString method including the given field names. @param object The object to "toString". @param includeFieldNames
src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java:425
↓ 12 callers
Method
apply
Applies a function and rethrows any exception as a {@link RuntimeException}. @param function the function to apply @param input1 the first input to a
src/main/java/org/apache/commons/lang3/function/Failable.java:147
↓ 12 callers
Method
asThis
Returns this instance typed as the subclass type {@code B}. <p> This is the same as the expression: </p> <pre> (B) this </pre> @return {@code this} i
src/main/java/org/apache/commons/lang3/builder/AbstractSupplier.java:50
↓ 12 callers
Method
between
Constructs a {@link NumericEntityEscaper} between the specified values (inclusive). @param codePointLow above which to escape. @param codePointHigh b
src/main/java/org/apache/commons/lang3/text/translate/NumericEntityEscaper.java:60
↓ 12 callers
Method
compare
Null safe comparison of Comparables. {@code null} is assumed to be less than a non-{@code null} value. <p> TODO Move to ComparableUtils. </p> @param
src/main/java/org/apache/commons/lang3/ObjectUtils.java:291
↓ 12 callers
Method
equals
(final Object obj)
src/main/java/org/apache/commons/lang3/reflect/TypeLiteral.java:97
↓ 12 callers
Method
equalsIgnoreCase
Compares two CharSequences, returning {@code true} if they represent equal sequences of characters, ignoring case. <p> {@code null}s are handled with
src/main/java/org/apache/commons/lang3/StringUtils.java:1893
↓ 12 callers
Method
escapeCsv
Returns a {@link String} value for a CSV column enclosed in double quotes, if required. <p>If the value contains a comma, newline or double quote, th
src/main/java/org/apache/commons/lang3/StringEscapeUtils.java:432
↓ 12 callers
Method
flush
{@inheritDoc}
src/main/java/org/apache/commons/lang3/text/StrBuilder.java:228
↓ 12 callers
Method
formatDurationHMS
Formats the time gap as a string. <p> The format used is ISO 8601-like: {@code HH:mm:ss.SSS}. </p> @param durationMillis the duration to format. @ret
src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java:403
↓ 12 callers
Method
get
Null-safe call to {@link Supplier#get()}. @param <T> The type of results supplied by this supplier. @param supplier the supplier or null. @return Res
src/main/java/org/apache/commons/lang3/function/Suppliers.java:45
↓ 12 callers
Method
getAcceptedObject
()
src/test/java/org/apache/commons/lang3/FunctionsTest.java:148
↓ 12 callers
Method
getAcceptedObject
()
src/test/java/org/apache/commons/lang3/function/FailableTest.java:208
↓ 12 callers
Method
getBoolean
Gets the current value for the property named {@code "SimpleClassName.Key"} as a {@code boolean}. <p> The parsing rules are as {@link Boolean#parseBoo
src/main/java/org/apache/commons/lang3/SystemProperties.java:1618
↓ 12 callers
Method
getClass
Delegates to {@link Object#getClass()} using generics. @param <T> The argument type or null. @param object The argument. @return The argument's Class
src/main/java/org/apache/commons/lang3/ObjectUtils.java:603
↓ 12 callers
Method
getFirstEnum
Gets the enum for the class and value, returning {@code defaultEnum} if not found. <p> This method differs from {@link Enum#valueOf} in that it does
src/main/java/org/apache/commons/lang3/EnumUtils.java:345
↓ 12 callers
Method
getFirstEnumIgnoreCase
Gets the enum for the class, returning {@code defaultEnum} if not found. <p>This method differs from {@link Enum#valueOf} in that it does not throw a
src/main/java/org/apache/commons/lang3/EnumUtils.java:366
↓ 12 callers
Method
getId
()
src/test/java/org/apache/commons/lang3/EnumUtilsTest.java:635
↓ 12 callers
Method
getJaroWinklerDistance
Gets the Jaro Winkler Distance which indicates the similarity score between two Strings. <p> The Jaro measure is the weighted sum of percentage of ma
src/main/java/org/apache/commons/lang3/StringUtils.java:2265
↓ 12 callers
Method
getMethodObject
Gets a Method, or {@code null} if a checked {@link Class#getMethod(String, Class...) } exception is thrown. @param cls Receiver for {@link
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java:465
↓ 12 callers
Method
getNanosOfMilli
Gets the nanosecond part of a Duration converted to milliseconds. <p> Handy when calling an API that takes a long of milliseconds and an int of nanose
src/main/java/org/apache/commons/lang3/time/DurationUtils.java:127
↓ 12 callers
Method
getTokenArray
Gets a copy of the full token list as an independent modifiable array. @return the tokens as a String array.
src/main/java/org/apache/commons/lang3/text/StrTokenizer.java:536
↓ 12 callers
Method
hashCode
Gets a hash code compatible with the equals method. @return a suitable hash code. @since 2.0
src/main/java/org/apache/commons/lang3/CharSet.java:286
↓ 12 callers
Method
hashCode
()
src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java:311
↓ 12 callers
Method
incrementAndCheckState
Increments the monitored value and performs a check of the current state of this circuit breaker. This method works like {@link #checkState()}, but th
src/main/java/org/apache/commons/lang3/concurrent/CircuitBreaker.java:68
← previous
next →
601–700 of 9,093, ranked by callers