MCPcopy Create free account

hub / github.com/apache/commons-lang / functions

Functions9,093 in github.com/apache/commons-lang

↓ 43 callersMethodequals
(final Object o)
src/test/java/org/apache/commons/lang3/tuple/PairTest.java:150
↓ 43 callersMethodhashCode
Gets a hashCode compatible with the equals method. @return a suitable hashCode.
src/main/java/org/apache/commons/lang3/CharRange.java:319
↓ 43 callersMethodreplaceIgnoreCase
Case insensitively replaces all occurrences of a String within another String. <p> A {@code null} reference passed to this method is a no-op. </p> <
src/main/java/org/apache/commons/lang3/StringUtils.java:6716
↓ 43 callersMethodwriteStaticField
Writes a named {@code public static} {@link Field}. Superclasses will be considered. @param cls {@link Class} on which the field is to be
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java:850
↓ 42 callersMethodformatDurationWords
Formats an elapsed time into a pluralization correct string. <p> This method formats durations using the days and lower fields of the format pattern.
src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java:436
↓ 41 callersMethodisSorted
Tests whether whether the provided array is sorted according to natural ordering ({@code false} before {@code true}). @param array the array to check
src/main/java/org/apache/commons/lang3/ArrayUtils.java:3875
↓ 40 callersMethodapplyNonNull
Applies a value to a function if the value isn't {@code null}, otherwise the method returns {@code null}. If the value isn't {@code null} then return
src/main/java/org/apache/commons/lang3/function/Failable.java:205
↓ 40 callersMethodlength
()
src/test/java/org/apache/commons/lang3/builder/EqualsBuilderReflectJreImplementationTest.java:79
↓ 40 callersMethodnegate
Returns a predicate that negates this predicate. @return a predicate that negates this predicate.
src/main/java/org/apache/commons/lang3/function/FailablePredicate.java:82
↓ 40 callersMethodsetByteBoolean
Sets a boolean BitField. @param holder the byte data containing the bits we're interested in. @param flag indicating whether to set or clear the bi
src/main/java/org/apache/commons/lang3/BitField.java:335
↓ 40 callersMethodsetThrowable
(final Throwable throwable)
src/test/java/org/apache/commons/lang3/FunctionsTest.java:160
↓ 40 callersMethodtoScaledBigDecimal
Converts a {@link BigDecimal} to a {@link BigDecimal} with a scale of two that has been rounded using {@code RoundingMode.HALF_EVEN}. If the supplied
src/main/java/org/apache/commons/lang3/math/NumberUtils.java:1504
↓ 39 callersMethodapplyAsDouble
Applies this function to the given arguments. @param t the first function argument @return the function result @throws E Thrown when the function fai
src/main/java/org/apache/commons/lang3/function/FailableToDoubleFunction.java:55
↓ 39 callersMethodapplyAsInt
Applies this function to the given arguments. @param t the first function argument @return the function result @throws E Thrown when the function fai
src/main/java/org/apache/commons/lang3/function/FailableToIntFunction.java:55
↓ 39 callersMethodensureCapacity
Checks the capacity and ensures that it is at least the size specified. @param capacity the capacity to ensure. @return {@code this} instance.
src/main/java/org/apache/commons/lang3/text/StrBuilder.java:1850
↓ 39 callersMethodrandom
Creates a random string whose length is the number of characters specified. <p> Characters will be chosen from the set of all characters. </p> @para
src/main/java/org/apache/commons/lang3/RandomStringUtils.java:134
↓ 39 callersMethodrepeat
Returns padding using the specified delimiter repeated to a given length. <pre> StringUtils.repeat('e', 0) = "" StringUtils.repeat('e', 3) = "eee"
src/main/java/org/apache/commons/lang3/StringUtils.java:6120
↓ 38 callersMethodapplyAsLong
Applies this function to the given arguments. @param t the first function argument @return the function result @throws E Thrown when the function fai
src/main/java/org/apache/commons/lang3/function/FailableToLongFunction.java:55
↓ 38 callersMethodcenter
Centers a String in a larger String of size {@code size} using the space character (' '). <p> If the size is less than the String length, the origina
src/main/java/org/apache/commons/lang3/StringUtils.java:588
↓ 38 callersMethodclone
()
src/test/java/org/apache/commons/lang3/ObjectUtilsTest.java:83
↓ 38 callersMethodfit
Fits the given element into this range by returning the given element or, if out of bounds, the range minimum if below, or the range maximum if above.
src/main/java/org/apache/commons/lang3/Range.java:347
↓ 38 callersMethodgetDimensions
Gets the number of dimensions of an array. <p> The <a href="https://docs.oracle.com/javase/specs/jvms/se25/html/jvms-4.html#jvms-4.3">JVM specificatio
src/main/java/org/apache/commons/lang3/ArrayUtils.java:2149
↓ 38 callersMethodinclusiveBetween
Validate that the specified primitive value falls between the two inclusive values specified; otherwise, throws an exception. <pre>Validate.inclusive
src/main/java/org/apache/commons/lang3/Validate.java:270
↓ 38 callersMethodisNaN
Checks whether the float value is the special NaN value. @return true if NaN.
src/main/java/org/apache/commons/lang3/mutable/MutableFloat.java:342
↓ 38 callersMethoditerator
()
src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java:206
↓ 38 callersMethodmax
Null safe comparison of Comparables. <p> TODO Move to ComparableUtils. </p> @param <T> type of the values processed by this method. @param values
src/main/java/org/apache/commons/lang3/ObjectUtils.java:1030
↓ 38 callersMethodof
Delegates to {@link Collection#stream()} or returns {@link Stream#empty()} if the collection is null. @param <E> The type of elements in the collecti
src/main/java/org/apache/commons/lang3/stream/Streams.java:675
↓ 38 callersMethodstartsWith
Tests if a CharSequence starts with a specified prefix. <p> {@code null}s are handled without exceptions. Two {@code null} references are considered
src/main/java/org/apache/commons/lang3/Strings.java:1422
↓ 37 callersMethodadd
Adds the value of this fraction to another, returning the result in reduced form. The algorithm follows Knuth, 4.5.1. @param fraction the fraction t
src/main/java/org/apache/commons/lang3/math/Fraction.java:505
↓ 37 callersMethodassertFalseIfAccessible
(final boolean test)
src/test/java/org/apache/commons/lang3/builder/AbstractBuilderTest.java:47
↓ 37 callersMethodcontainsTypeVariables
Tests, recursively, whether any of the type parameters associated with {@code type} are bound to variables. @param type The type to check for type va
src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java:373
↓ 37 callersMethodfill
Fills and returns the given array, assigning the given {@code boolean} value to each element of the array. @param a the array to fill (may be null)
src/main/java/org/apache/commons/lang3/ArrayFill.java:97
↓ 37 callersMethodgenerateBitVectors
Creates a bit vector representation of the given subset of an Enum using as many {@code long}s as needed. <p>This generates a value that is usable by
src/main/java/org/apache/commons/lang3/EnumUtils.java:148
↓ 37 callersMethodgetDeclaredMethod
(final String name, final Class<?>... parameterTypes)
src/test/java/org/apache/commons/lang3/function/MethodFixtures.java:31
↓ 37 callersMethodof
(final double min, final double max)
src/test/java/org/apache/commons/lang3/DoubleRangeTest.java:40
↓ 37 callersMethodof
(final int min, final int max)
src/test/java/org/apache/commons/lang3/IntegerRangeTest.java:41
↓ 37 callersMethodof
Creates an immutable pair of two objects inferring the generic types. @param <L> The left element type. @param <R> The right element type. @param lef
src/main/java/org/apache/commons/lang3/tuple/ImmutablePair.java:105
↓ 37 callersMethodoneHot
Performs a one-hot on an array of booleans. <p> This implementation returns true if one, and only one, of the supplied values is true. </p> <p> See al
src/main/java/org/apache/commons/lang3/BooleanUtils.java:285
↓ 37 callersMethodremoveAll
Removes each substring of the text String that matches the given regular expression pattern. This method is a {@code null} safe equivalent to: <ul>
src/main/java/org/apache/commons/lang3/RegExUtils.java:108
↓ 36 callersMethodaccept
Consumes a consumer and rethrows any exception as a {@link RuntimeException}. @param consumer the consumer to accept, may be null for a noop. @param
src/main/java/org/apache/commons/lang3/function/Failable.java:85
↓ 36 callersMethodadd
Adds to a date returning a new object. The original {@link Date} is unchanged. @param date the date, not null. @param calendarField the calendar fi
src/main/java/org/apache/commons/lang3/time/DateUtils.java:222
↓ 36 callersMethodbyteValue
Returns the value of this MutableByte as a byte. @return the numeric value represented by this object after conversion to type byte.
src/main/java/org/apache/commons/lang3/mutable/MutableByte.java:136
↓ 36 callersMethodgetNumberOfDiffs
Gets the number of differences between the two objects. @return the number of differences
src/main/java/org/apache/commons/lang3/builder/DiffResult.java:104
↓ 36 callersMethodindexOfThrowable
Returns the (zero-based) index of the first {@link Throwable} that matches the specified class (exactly) in the exception chain. Subclasses of the spe
src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java:617
↓ 36 callersMethodindexOfType
Returns the (zero-based) index of the first {@link Throwable} that matches the specified class or subclass in the exception chain. Subclasses of the s
src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java:654
↓ 36 callersMethodintersects
Returns true if the specified {@link BitSet} has any bits set to {@code true} that are also set to {@code true} in this {@link BitSet}. @param set {@
src/main/java/org/apache/commons/lang3/util/FluentBitSet.java:280
↓ 36 callersMethodisEmpty
Checks is the string builder is empty (convenience Collections API style method). <p> This method is the same as checking {@link #length()} and is pro
src/main/java/org/apache/commons/lang3/text/StrBuilder.java:2306
↓ 36 callersMethodlastIndexOfIgnoreCase
Case insensitive find of the last index within a CharSequence. <p> A {@code null} CharSequence will return {@code -1}. A negative start position retu
src/main/java/org/apache/commons/lang3/StringUtils.java:5037
↓ 36 callersMethodnotEmpty
<p>Validates that the specified argument collection is neither {@code null} nor a size of zero (no elements); otherwise throwing an exception. <pre>V
src/main/java/org/apache/commons/lang3/Validate.java:828
↓ 36 callersMethodreplaceChars
Replaces all occurrences of a character in a String with another. This is a null-safe version of {@link String#replace(char, char)}. <p> A {@code nul
src/main/java/org/apache/commons/lang3/StringUtils.java:6347
↓ 36 callersMethodshortValue
Returns the value of this MutableShort as a short. @return the numeric value represented by this object after conversion to type short.
src/main/java/org/apache/commons/lang3/mutable/MutableShort.java:342
↓ 36 callersMethodsingletonArray
(final Class<?> c)
src/test/java/org/apache/commons/lang3/reflect/ConstructorUtilsTest.java:147
↓ 36 callersMethodthrowableOfThrowable
Returns the first {@link Throwable} that matches the specified class (exactly) in the exception chain. Subclasses of the specified class do not match
src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java:955
↓ 36 callersMethodthrowableOfType
Returns the throwable of the first {@link Throwable} that matches the specified class or subclass in the exception chain. Subclasses of the specified
src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java:995
↓ 36 callersMethodwriteDeclaredField
Writes a {@code public} {@link Field}. Only the specified class will be considered. @param target the object to reflect, must not be {@cod
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java:639
↓ 35 callersMethodaccept
Consumes a consumer and rethrows any exception as a {@link RuntimeException}. @param consumer the consumer to consume @param object1 the first object
src/main/java/org/apache/commons/lang3/Functions.java:296
↓ 35 callersMethodaddFirst
Copies the given array and adds the given element at the beginning of the new array. <p> The new array contains the same elements of the input array p
src/main/java/org/apache/commons/lang3/ArrayUtils.java:1206
↓ 35 callersMethodassertEqualDuration
(final String expected, final int[] start, final int[] end, final String format)
src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java:68
↓ 35 callersMethodgenerateBitVector
Creates a long bit vector representation of the given array of Enum values. <p>This generates a value that is usable by {@link EnumUtils#processBitVe
src/main/java/org/apache/commons/lang3/EnumUtils.java:97
↓ 35 callersMethodreplace
Replaces all occurrences of a String within another String. <p> A {@code null} reference passed to this method is a no-op. </p> <pre> StringUtils.re
src/main/java/org/apache/commons/lang3/StringUtils.java:6237
↓ 35 callersMethodtoString
Formats a given type as a Java-esque String. @param type the type to create a String representation for, not {@code null}. @return String. @throws Nu
src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java:1560
↓ 34 callersMethodbitSet
Gets the wrapped bit set. @return the wrapped bit set.
src/main/java/org/apache/commons/lang3/util/FluentBitSet.java:127
↓ 34 callersMethodexclusiveBetween
Validate that the specified primitive value falls between the two exclusive values specified; otherwise, throws an exception. <pre>Validate.exclusive
src/main/java/org/apache/commons/lang3/Validate.java:93
↓ 34 callersMethodisArrayType
Tests whether the specified type denotes an array type. @param type the type to be checked. @return {@code true} if {@code type} is an array class or
src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java:936
↓ 34 callersMethodisNotEmpty
Tests whether an array of primitive booleans is not empty and not {@code null}. @param array the array to test. @return {@code true} if the array is
src/main/java/org/apache/commons/lang3/ArrayUtils.java:3643
↓ 34 callersMethodstream
Converts the given {@link Collection} into a {@link FailableStream}. This is basically a simplified, reduced version of the {@link Stream} class, with
src/main/java/org/apache/commons/lang3/Streams.java:506
↓ 34 callersMethodtoString
Gets the {@code toString()} of an {@link Object} or the empty string ({@code ""}) if the input is {@code null}. <pre> ObjectUtils.toString(null)
src/main/java/org/apache/commons/lang3/ObjectUtils.java:1235
↓ 34 callersMethodwrapIfMissing
Wraps a string with a char if that char is missing from the start or end of the given string. <p> A new {@link String} will not be created if {@code
src/main/java/org/apache/commons/lang3/StringUtils.java:9287
↓ 34 callersMethodxor
Performs an xor on a set of booleans. <p> This behaves like an XOR gate; it returns true if the number of true values is odd, and false if the n
src/main/java/org/apache/commons/lang3/BooleanUtils.java:1179
↓ 33 callersMethodcontains
Checks if the string builder contains the specified char. @param ch the character to find. @return true if the builder contains the character.
src/main/java/org/apache/commons/lang3/text/StrBuilder.java:1627
↓ 33 callersMethodcontainsOnly
Tests if the CharSequence contains only certain characters. <p> A {@code null} CharSequence will return {@code false}. A {@code null} valid character
src/main/java/org/apache/commons/lang3/StringUtils.java:1320
↓ 33 callersMethodcreateTokenWithCount
(final CharSequence value, final int count)
src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java:115
↓ 33 callersMethodget
Transforms the given string with a Java version number to the corresponding constant of this enumeration class. This method is used internally. @para
src/main/java/org/apache/commons/lang3/JavaVersion.java:226
↓ 33 callersMethodgetPackageCanonicalName
Gets the package name from the canonical name of a {@link Class}. @param cls the class to get the package name for, may be {@code null}. @return the
src/main/java/org/apache/commons/lang3/ClassUtils.java:735
↓ 33 callersMethodgetProcessor
Gets a {@link Processor} object of the current JVM. <p> Important: The {@code "os.arch"} system property returns the architecture used by the JVM not
src/main/java/org/apache/commons/lang3/ArchUtils.java:76
↓ 33 callersMethodof
Creates 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/ImmutableTriple.java:96
↓ 33 callersMethodreflectionHashCode
Uses reflection to build a valid hash code from the fields of {@code object}. <p> It uses {@code AccessibleObject.setAccessible} to gain access to pr
src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java:297
↓ 33 callersMethodsort
Sorts the given array into ascending order and returns it. @param array the array to sort (may be null). @return the given array. @see Arrays#sort(by
src/main/java/org/apache/commons/lang3/ArraySorter.java:38
↓ 32 callersMethodcompose
Returns a composed {@link FailableFunction} like {@link Function#compose(Function)}. @param <V> The input type to the {@code before} function, and to
src/main/java/org/apache/commons/lang3/function/FailableFunction.java:107
↓ 32 callersMethodgetCause
Introspects the {@link Throwable} to obtain the cause. <p> The method searches for methods with specific names that return a {@link Throwable} object
src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java:213
↓ 32 callersMethodgetRawOffset
()
src/main/java/org/apache/commons/lang3/time/GmtTimeZone.java:84
↓ 32 callersMethodindexOfDifference
Compares all CharSequences in an array and returns the index at which the CharSequences begin to differ. <p> For example, {@code indexOfDifference(ne
src/main/java/org/apache/commons/lang3/StringUtils.java:2974
↓ 32 callersMethodisAfterRange
Checks whether this range is completely after the specified range. <p>This method may fail if the ranges have two different comparators or element ty
src/main/java/org/apache/commons/lang3/Range.java:442
↓ 32 callersMethodunwrap
Unwraps a given string from a character. <pre> StringUtils.unwrap(null, null) = null StringUtils.unwrap(null, '\0') = null StringUtil
src/main/java/org/apache/commons/lang3/StringUtils.java:9096
↓ 31 callersMethodcontains
Tests if CharSequence contains a search CharSequence, handling {@code null}. This method uses {@link String#indexOf(String)} if possible. <p>A {@code
src/main/java/org/apache/commons/lang3/StringUtils.java:1019
↓ 31 callersMethodparameterize
Creates a parameterized type instance. @param rawClass the raw class to create a parameterized type instance for. @param typeVariableMap the m
src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java:1411
↓ 31 callersMethodremoveFirst
Removes the first substring of the text string that matches the given regular expression pattern. This method is a {@code null} safe equivalent to: <
src/main/java/org/apache/commons/lang3/RegExUtils.java:229
↓ 31 callersMethodtranslate
{@inheritDoc}
src/main/java/org/apache/commons/lang3/text/translate/UnicodeEscaper.java:124
↓ 31 callersMethodverify
Verifies that change events for the expected values have been received. @param values the expected values
src/test/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreakerTest.java:78
↓ 30 callersMethodappendDetail
Appends to the {@code toString} a {@code boolean} value. @param buffer the {@link StringBuffer} to populate. @param fieldName the field name, typi
src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java:1104
↓ 30 callersMethodbinaryToHexDigit
Converts binary (represented as boolean array) to a hexadecimal digit using the default (LSB0) bit ordering. <p> (1, 0, 0, 0) is converted as follow:
src/main/java/org/apache/commons/lang3/Conversion.java:188
↓ 30 callersMethoddiff
(final TypeTestClass obj)
src/test/java/org/apache/commons/lang3/builder/DiffBuilderTest.java:91
↓ 30 callersMethodgetArrayComponentType
Gets the array component type of {@code type}. @param type the type to be checked. @return component type or null if type is not an array type.
src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java:593
↓ 30 callersMethodgetOsNameMatches
Tests if the operating system matches the given string with a case-insensitive comparison. <p> The result depends on the value of the {@link #OS_NAME}
src/main/java/org/apache/commons/lang3/SystemUtils.java:2243
↓ 30 callersMethodgetPattern
Gets the pattern used by this parser. @return the pattern, {@link java.text.SimpleDateFormat} compatible.
src/main/java/org/apache/commons/lang3/time/DateParser.java:51
↓ 30 callersMethodgetRawValue
Gets the value for the specified BitField, unshifted. @param holder the int data containing the bits we're interested in. @return the selected bits.
src/main/java/org/apache/commons/lang3/BitField.java:147
↓ 30 callersMethodhasNext
()
src/main/java/org/apache/commons/lang3/ClassUtils.java:1210
↓ 30 callersMethodor
Performs an 'or' operation on a set of booleans. <pre> BooleanUtils.or(true, true) = true BooleanUtils.or(false, false) = false
src/main/java/org/apache/commons/lang3/BooleanUtils.java:338
↓ 30 callersMethodset
Sets the bits. @param holder the int data containing the bits we're interested in. @return the value of holder with the specified bits set to {@code
src/main/java/org/apache/commons/lang3/BitField.java:280
↓ 30 callersMethodvalidIndex
Validates that the index is within the bounds of the argument collection; otherwise throwing an exception. <pre>Validate.validIndex(myCollection, 2);
src/main/java/org/apache/commons/lang3/Validate.java:1088
← previousnext →201–300 of 9,093, ranked by callers