public final class Fn extends Comparators
Map map = N.asMap("a", 1, "b", 2, "c", 3);
// Instead of
Stream.of(map).filter(e -> e.getKey().equals("a") || e.getKey().equals("b")).toMap(e -> e.getKey(), e -> e.getValue());
// Using Fn
Stream.of(map).filter(Fn.testByKey(k -> k.equals("a") || k.equals("b"))).collect(Collectors.toMap());
| Modifier and Type | Class and Description |
|---|---|
static class |
Fn.BiConsumers
The Class BiConsumers.
|
static class |
Fn.BiFunctions
The Class BiFunctions.
|
static class |
Fn.BinaryOperators
The Class BinaryOperators.
|
static class |
Fn.BiPredicates
The Class BiPredicates.
|
static class |
Fn.Consumers
The Class Consumers.
|
static class |
Fn.Disposables
The Class Disposables.
|
static class |
Fn.Entries
The Class Entries.
|
static class |
Fn.Factory
The Class Factory.
|
static class |
Fn.FnB
Utility class for
BytePredicate/Function/Consumer. |
static class |
Fn.FnC
Utility class for
CharPredicate/Function/Consumer. |
static class |
Fn.FnD
Utility class for
DoublePredicate/Function/Consumer. |
static class |
Fn.FnF
Utility class for
FloatPredicate/Function/Consumer. |
static class |
Fn.FnI
Utility class for
IntPredicate/Function/Consumer. |
static class |
Fn.FnL
Utility class for
LongPredicate/Function/Consumer. |
static class |
Fn.Fnn
Utility class for exceptional
Predicate/Function/Consumer. |
static class |
Fn.FnS
Utility class for
ShortPredicate/Function/Consumer. |
static class |
Fn.Functions
The Class Functions.
|
static class |
Fn.IntFunctions
The Class IntFunctions.
|
static class |
Fn.Pairs
The Class Pairs.
|
static class |
Fn.Predicates
The Class Predicates.
|
static class |
Fn.Suppliers
The Class Suppliers.
|
static class |
Fn.TriConsumers
The Class TriConsumers.
|
static class |
Fn.TriFunctions
The Class TriFunctions.
|
static class |
Fn.Triples
The Class Triples.
|
static class |
Fn.TriPredicates
The Class TriPredicates.
|
static class |
Fn.UnaryOperators
The Class UnaryOperators.
|
| Modifier and Type | Field and Description |
|---|---|
static IntFunction<LinkedHashMap<String,Object>> |
FACTORY_OF_LINKED_HASH_MAP |
static IntFunction<Map<String,Object>> |
FACTORY_OF_MAP |
static Supplier<LinkedHashMap<String,Object>> |
SUPPLIER_OF_LINKED_HASH_MAP |
static Supplier<Map<String,Object>> |
SUPPLIER_OF_MAP |
BOOLEAN_ARRAY_COMPARATOR, BYTE_ARRAY_COMPARATOR, CHAR_ARRAY_COMPARATOR, COLLECTION_COMPARATOR, DOUBLE_ARRAY_COMPARATOR, FLOAT_ARRAY_COMPARATOR, INT_ARRAY_COMPARATOR, LONG_ARRAY_COMPARATOR, OBJECT_ARRAY_COMPARATOR, SHORT_ARRAY_COMPARATOR| Modifier and Type | Method and Description |
|---|---|
static <K,V> Consumer<Map.Entry<K,V>> |
acceptByKey(Consumer<? super K> consumer)
Accept by key.
|
static <K,V> Consumer<Map.Entry<K,V>> |
acceptByValue(Consumer<? super V> consumer)
Accept by value.
|
static <K,V> Consumer<Map.Entry<K,V>> |
acceptKeyVal(BiConsumer<? super K,? super V> consumer)
Accept key val.
|
static <T> BiFunction<T,T,MergeResult> |
alternated()
Returns a stateful
BiFunction. |
static <T> Predicate<T> |
alwaysFalse() |
static <T> Predicate<T> |
alwaysTrue() |
static <T,U> BiPredicate<T,U> |
and(BiPredicate<? super T,? super U> first,
BiPredicate<? super T,? super U> second) |
static <T,U> BiPredicate<T,U> |
and(BiPredicate<? super T,? super U> first,
BiPredicate<? super T,? super U> second,
BiPredicate<? super T,? super U> third) |
static BooleanSupplier |
and(BooleanSupplier first,
BooleanSupplier second) |
static BooleanSupplier |
and(BooleanSupplier first,
BooleanSupplier second,
BooleanSupplier third) |
static <T> Predicate<T> |
and(Collection<Predicate<? super T>> c) |
static <T,U> BiPredicate<T,U> |
and(List<BiPredicate<? super T,? super U>> c) |
static <T> Predicate<T> |
and(Predicate<? super T> first,
Predicate<? super T> second) |
static <T> Predicate<T> |
and(Predicate<? super T> first,
Predicate<? super T> second,
Predicate<? super T> third) |
static <K,V,R> Function<Map.Entry<K,V>,R> |
applyByKey(Function<? super K,R> func)
Apply by key.
|
static <K,V,R> Function<Map.Entry<K,V>,R> |
applyByValue(Function<? super V,R> func)
Apply by value.
|
static <A,B,C,D,R> |
applyIfNotNullOrDefault(Function<A,B> mapperA,
Function<B,C> mapperB,
Function<C,D> mapperC,
Function<D,R> mapperD,
R defaultValue)
Apply if not null or default.
|
static <A,B,C,R> Function<A,R> |
applyIfNotNullOrDefault(Function<A,B> mapperA,
Function<B,C> mapperB,
Function<C,R> mapperC,
R defaultValue)
Apply if not null or default.
|
static <A,B,R> Function<A,R> |
applyIfNotNullOrDefault(Function<A,B> mapperA,
Function<B,R> mapperB,
R defaultValue)
Apply if not null or default.
|
static <A,B,C,D,R> |
applyIfNotNullOrGet(Function<A,B> mapperA,
Function<B,C> mapperB,
Function<C,D> mapperC,
Function<D,R> mapperD,
Supplier<R> supplier)
Apply if not null or get.
|
static <A,B,C,R> Function<A,R> |
applyIfNotNullOrGet(Function<A,B> mapperA,
Function<B,C> mapperB,
Function<C,R> mapperC,
Supplier<R> supplier)
Apply if not null or get.
|
static <A,B,R> Function<A,R> |
applyIfNotNullOrGet(Function<A,B> mapperA,
Function<B,R> mapperB,
Supplier<R> supplier)
Apply if not null or get.
|
static <K,V,R> Function<Map.Entry<K,V>,R> |
applyKeyVal(BiFunction<? super K,? super V,R> func)
Apply key val.
|
static <T extends Comparable<? super T>> |
between(T minValue,
T maxValue)
Deprecated.
replaced by
gtAndLt. |
static <A,T> Consumer<T> |
c(A a,
BiConsumer<A,T> biConsumer) |
static <A,B,T> Consumer<T> |
c(A a,
B b,
TriConsumer<A,B,T> triConsumer) |
static <A,T,U> BiConsumer<T,U> |
c(A a,
TriConsumer<A,T,U> triConsumer) |
static <T,U> BiConsumer<T,U> |
c(BiConsumer<T,U> biConsumer) |
static <R> Callable<R> |
c(Callable<R> callable) |
static <T> Consumer<T> |
c(Consumer<T> predicate) |
static <A,B,C> TriConsumer<A,B,C> |
c(TriConsumer<A,B,C> triConsumer) |
static <T,U> BiFunction<T,U,Void> |
c2f(BiConsumer<? super T,? super U> action) |
static <T,U,R> BiFunction<T,U,R> |
c2f(BiConsumer<? super T,? super U> action,
R valueToReturn) |
static <T> Function<T,Void> |
c2f(Consumer<? super T> action) |
static <T,R> Function<T,R> |
c2f(Consumer<? super T> action,
R valueToReturn) |
static <A,B,C> TriFunction<A,B,C,Void> |
c2f(TriConsumer<? super A,? super B,? super C> action) |
static <A,B,C,R> TriFunction<A,B,C,R> |
c2f(TriConsumer<? super A,? super B,? super C> action,
R valueToReturn) |
static <R> Runnable |
c2r(Callable<R> callable) |
static <R> Callable<R> |
callable(Callable<R> callable)
Deprecated.
replaced by
c(Callable) |
static <T,U> Function<T,U> |
cast(Class<U> clazz) |
static <A,B,T,E extends Exception> |
cc(A a,
B b,
Throwables.TriConsumer<A,B,T,E> triConsumer) |
static <A,T,E extends Exception> |
cc(A a,
Throwables.BiConsumer<A,T,E> biConsumer) |
static <A,T,U,E extends Exception> |
cc(A a,
Throwables.TriConsumer<A,T,U,E> triConsumer) |
static <T,U,E extends Exception> |
cc(Throwables.BiConsumer<T,U,E> biConsumer) |
static <R,E extends Exception> |
cc(Throwables.Callable<R,E> callable) |
static <T,E extends Exception> |
cc(Throwables.Consumer<T,E> consumer) |
static <A,B,C,E extends Exception> |
cc(Throwables.TriConsumer<A,B,C,E> triConsumer) |
static <T extends AutoCloseable> |
close() |
static Runnable |
close(AutoCloseable closeable) |
static Runnable |
closeAll(AutoCloseable... a) |
static Runnable |
closeAll(Collection<? extends AutoCloseable> c) |
static Runnable |
closeAllQuietly(AutoCloseable... a)
Close all quietly.
|
static Runnable |
closeAllQuietly(Collection<? extends AutoCloseable> c)
Close all quietly.
|
static <T extends AutoCloseable> |
closeQuietly() |
static Runnable |
closeQuietly(AutoCloseable closeable) |
static <T extends Comparable<? super T>> |
compare() |
static <T> BiFunction<T,T,Integer> |
compare(Comparator<? super T> cmp) |
static <T extends Comparable<? super T>> |
compareTo(T target) |
static <T> Function<T,Integer> |
compareTo(T target,
Comparator<? super T> cmp) |
static Predicate<String> |
contains(String str) |
static Function<String,Number> |
createNumber()
Creates the number.
|
static <T> Consumer<T> |
doNothing() |
static Runnable |
emptyAction() |
static Predicate<String> |
endsWith(String suffix) |
static <K,V> BiFunction<K,V,Map.Entry<K,V>> |
entry() |
static <K,V> Function<V,Map.Entry<K,V>> |
entry(Function<? super V,K> keyMapper)
Deprecated.
replaced by
Fn#entryByKeyMapper(Function) |
static <K,V> Function<V,Map.Entry<K,V>> |
entry(K key)
Deprecated.
replaced by
Fn#entryWithKey(Object) |
static <K,V> Function<V,Map.Entry<K,V>> |
entryByKeyMapper(Function<? super V,K> keyMapper) |
static <K,V> Function<K,Map.Entry<K,V>> |
entryByValueMapper(Function<? super K,V> valueMapper) |
static <K,V> Function<V,Map.Entry<K,V>> |
entryWithKey(K key) |
static <K,V> Function<K,Map.Entry<K,V>> |
entryWithValue(V value) |
static <T> Predicate<T> |
eqOr(Object targetValue1,
Object targetValue2) |
static <T> Predicate<T> |
eqOr(Object targetValue1,
Object targetValue2,
Object targetValue3) |
static <T,U> BiPredicate<T,U> |
equal() |
static <T> Predicate<T> |
equal(Object target) |
static <A,T,R> Function<T,R> |
f(A a,
BiFunction<A,T,R> biFunction) |
static <A,B,T,R> Function<T,R> |
f(A a,
B b,
TriFunction<A,B,T,R> triFunction) |
static <A,T,U,R> BiFunction<T,U,R> |
f(A a,
TriFunction<A,T,U,R> triFunction) |
static <T,U,R> BiFunction<T,U,R> |
f(BiFunction<T,U,R> biFunction) |
static <T,R> Function<T,R> |
f(Function<T,R> predicate) |
static <A,B,C,R> TriFunction<A,B,C,R> |
f(TriFunction<A,B,C,R> triFunction) |
static <T,U> BiConsumer<T,U> |
f2c(BiFunction<? super T,? super U,?> func) |
static <T> Consumer<T> |
f2c(Function<? super T,?> func)
Returns a
Consumer which calls the specified func. |
static <A,B,C> TriConsumer<A,B,C> |
f2c(TriFunction<? super A,? super B,? super C,?> func) |
static <A,B,T,R,E extends Exception> |
ff(A a,
B b,
Throwables.TriFunction<A,B,T,R,E> triFunction) |
static <A,T,R,E extends Exception> |
ff(A a,
Throwables.BiFunction<A,T,R,E> biFunction) |
static <A,T,U,R,E extends Exception> |
ff(A a,
Throwables.TriFunction<A,T,U,R,E> triFunction) |
static <T,U,R,E extends Exception> |
ff(Throwables.BiFunction<T,U,R,E> biFunction) |
static <T,U,R,E extends Exception> |
ff(Throwables.BiFunction<T,U,R,E> biFunction,
R defaultOnError) |
static <T,R,E extends Exception> |
ff(Throwables.Function<T,R,E> function) |
static <T,R,E extends Exception> |
ff(Throwables.Function<T,R,E> function,
R defaultOnError) |
static <A,B,C,R,E extends Exception> |
ff(Throwables.TriFunction<A,B,C,R,E> triFunction) |
static <A,B,C,R,E extends Exception> |
ff(Throwables.TriFunction<A,B,C,R,E> triFunction,
R defaultOnError) |
static <T,U> BiPredicate<T,U> |
filterThenLimit(BiPredicate<T,U> predicate,
int limit)
Returns a stateful
Predicate. |
static <T> Predicate<T> |
filterThenLimit(Predicate<T> predicate,
int limit)
Returns a stateful
Predicate. |
static <K,V> Function<? super Map<K,? extends Collection<? extends V>>,List<Map<K,V>>> |
flatToMap()
{a=[1, 2, 3], b=[4, 5, 6], c=[7, 8]} -> [{a=1, b=4, c=7}, {a=2, b=5, c=8}, {a=3, b=6}]
|
static <T> Function<Future<T>,T> |
futureGet() |
static <T> Function<Future<T>,T> |
futureGetOrDefaultOnError(T defaultValue) |
static <T extends Comparable<? super T>> |
geAndLe(T minValue,
T maxValue)
Checks if the value/element:
minValue <= e <= maxValue. |
static <T extends Comparable<? super T>> |
geAndLt(T minValue,
T maxValue)
Checks if the value/element:
minValue <= e < maxValue. |
static <T> T |
get(Supplier<T> supplier) |
static <T extends Comparable<? super T>> |
greaterEqual() |
static <T extends Comparable<? super T>> |
greaterEqual(T target) |
static <T extends Comparable<? super T>> |
greaterThan() |
static <T extends Comparable<? super T>> |
greaterThan(T target) |
static <T extends Comparable<? super T>> |
gtAndLe(T minValue,
T maxValue)
Checks if the value/element:
minValue < e <= maxValue. |
static <T extends Comparable<? super T>> |
gtAndLt(T minValue,
T maxValue)
Checks if the value/element:
minValue < e < maxValue. |
static <T> Function<T,T> |
identity() |
static <T> BinaryOperator<T> |
ignoringMerger() |
static <T> Predicate<T> |
in(Collection<?> c) |
static <T> Function<T,Indexed<T>> |
indexed()
Returns a stateful
Predicate. |
static <T> Predicate<T> |
indexed(IndexedPredicate<T> predicate)
Returns a stateful
Predicate. |
static <T> Predicate<T> |
instanceOf(Class<?> clazz) |
static <K,V> Function<Map.Entry<K,V>,Map.Entry<V,K>> |
inverse() |
static Predicate<File> |
isDirectory()
Checks if is directory.
|
static Predicate<File> |
isFile()
Checks if is file.
|
static <T> Predicate<T> |
isNull()
Checks if is null.
|
static <T> Predicate<T> |
isNull(Function<T,?> valueExtractor)
Checks if is null.
|
static <T extends CharSequence> |
isNullOrEmpty()
Checks if is null or empty.
|
static <T> Predicate<T> |
isNullOrEmpty(Function<T,? extends CharSequence> valueExtractor) |
static <T> Predicate<T[]> |
isNullOrEmptyA() |
static <T extends Collection> |
isNullOrEmptyC() |
static <T extends Map> |
isNullOrEmptyM() |
static <T extends CharSequence> |
isNullOrEmptyOrBlank()
Checks if is null or empty or blank.
|
static <T> Predicate<T> |
isNullOrEmptyOrBlank(Function<T,? extends CharSequence> valueExtractor) |
static <R> Callable<R> |
jc2c(Callable<R> callable) |
static Runnable |
jc2r(Callable<?> callable) |
static Callable<Void> |
jr2c(Runnable runnable) |
static Runnable |
jr2r(Runnable runnable) |
static <K,V> Function<Map.Entry<K,V>,K> |
key() |
static <K,T> Function<T,Keyed<K,T>> |
keyed(Function<? super T,K> keyMapper) |
static <T,K,V> Function<Map.Entry<Keyed<K,T>,V>,T> |
kk() |
static <L,R> Function<Pair<L,R>,L> |
left() |
static <T> Function<T[],Integer> |
len() |
static <T extends CharSequence> |
length() |
static <T extends Comparable<? super T>> |
lessEqual() |
static <T extends Comparable<? super T>> |
lessEqual(T target) |
static <T extends Comparable<? super T>> |
lessThan() |
static <T extends Comparable<? super T>> |
lessThan(T target) |
static <T,U> BiPredicate<T,U> |
limitThenFilter(int limit,
BiPredicate<T,U> predicate)
Returns a stateful
Predicate. |
static <T> Predicate<T> |
limitThenFilter(int limit,
Predicate<T> predicate)
Returns a stateful
Predicate. |
static <K,V,KK> Function<Map.Entry<K,V>,Map.Entry<KK,V>> |
mapKey(Function<? super K,? extends KK> func) |
static <K,V,VV> Function<Map.Entry<K,V>,Map.Entry<K,VV>> |
mapValue(Function<? super V,? extends VV> func) |
static Predicate<CharSequence> |
matches(Pattern pattern) |
static <T,R> Function<T,R> |
memoize(Function<? super T,? extends R> func) |
static <T> Supplier<T> |
memoize(Supplier<T> supplier)
Returns a
Supplier which returns a single instance created by calling the specified supplier.get(). |
static <T,U> BiPredicate<T,U> |
not(BiPredicate<T,U> biPredicate) |
static <T> Predicate<T> |
not(Predicate<T> predicate) |
static <A,B,C> TriPredicate<A,B,C> |
not(TriPredicate<A,B,C> triPredicate) |
static Predicate<String> |
notContains(String str) |
static Predicate<String> |
notEndsWith(String suffix)
Not ends with.
|
static <T,U> BiPredicate<T,U> |
notEqual() |
static <T> Predicate<T> |
notEqual(Object target) |
static <T> Predicate<T> |
notIn(Collection<?> c) |
static <T> Predicate<T> |
notNull() |
static <T> Predicate<T> |
notNull(Function<T,?> valueExtractor)
Not null
|
static <T extends CharSequence> |
notNullOrEmpty()
Not null or empty.
|
static <T> Predicate<T> |
notNullOrEmpty(Function<T,? extends CharSequence> valueExtractor) |
static <T> Predicate<T[]> |
notNullOrEmptyA() |
static <T extends Collection> |
notNullOrEmptyC() |
static <T extends Map> |
notNullOrEmptyM() |
static <T extends CharSequence> |
notNullOrEmptyOrBlank()
Not null or empty or blank.
|
static <T> Predicate<T> |
notNullOrEmptyOrBlank(Function<T,? extends CharSequence> valueExtractor) |
static Predicate<String> |
notStartsWith(String prefix)
Not starts with.
|
static Function<String,String> |
nullToEmpty() |
static <T> Function<List<T>,List<T>> |
nullToEmptyL()
Deprecated.
replaced by
nullToEmptyList |
static <T> Function<List<T>,List<T>> |
nullToEmptyList() |
static <K,V> Function<Map<K,V>,Map<K,V>> |
nullToEmptyM()
Deprecated.
replaced by
nullToEmptyMap |
static <K,V> Function<Map<K,V>,Map<K,V>> |
nullToEmptyMap() |
static <T> Function<Set<T>,Set<T>> |
nullToEmptyS()
Deprecated.
replaced by
nullToEmptySet |
static <T> Function<Set<T>,Set<T>> |
nullToEmptySet() |
static <T extends Number> |
numToDouble()
Num to double.
|
static <T extends Number> |
numToInt()
Num to int.
|
static <T extends Number> |
numToLong()
Num to long.
|
static <T,U> BiPredicate<T,U> |
or(BiPredicate<? super T,? super U> first,
BiPredicate<? super T,? super U> second) |
static <T,U> BiPredicate<T,U> |
or(BiPredicate<? super T,? super U> first,
BiPredicate<? super T,? super U> second,
BiPredicate<? super T,? super U> third) |
static BooleanSupplier |
or(BooleanSupplier first,
BooleanSupplier second) |
static BooleanSupplier |
or(BooleanSupplier first,
BooleanSupplier second,
BooleanSupplier third) |
static <T> Predicate<T> |
or(Collection<Predicate<? super T>> c) |
static <T,U> BiPredicate<T,U> |
or(List<BiPredicate<? super T,? super U>> c) |
static <T> Predicate<T> |
or(Predicate<? super T> first,
Predicate<? super T> second) |
static <T> Predicate<T> |
or(Predicate<? super T> first,
Predicate<? super T> second,
Predicate<? super T> third) |
static <A,T> Predicate<T> |
p(A a,
BiPredicate<A,T> biPredicate) |
static <A,B,T> Predicate<T> |
p(A a,
B b,
TriPredicate<A,B,T> triPredicate) |
static <A,T,U> BiPredicate<T,U> |
p(A a,
TriPredicate<A,T,U> triPredicate) |
static <T,U> BiPredicate<T,U> |
p(BiPredicate<T,U> biPredicate) |
static <T> Predicate<T> |
p(Predicate<T> predicate) |
static <A,B,C> TriPredicate<A,B,C> |
p(TriPredicate<A,B,C> triPredicate) |
static <L,R> BiFunction<L,R,Pair<L,R>> |
pair() |
static Function<String,Byte> |
parseByte()
Parses the byte.
|
static Function<String,Double> |
parseDouble()
Parses the double.
|
static Function<String,Float> |
parseFloat()
Parses the float.
|
static Function<String,Integer> |
parseInt()
Parses the int.
|
static Function<String,Long> |
parseLong()
Parses the long.
|
static Function<String,Short> |
parseShort()
Parses the short.
|
static <A,B,T,E extends Exception> |
pp(A a,
B b,
Throwables.TriPredicate<A,B,T,E> triPredicate) |
static <A,T,E extends Exception> |
pp(A a,
Throwables.BiPredicate<A,T,E> biPredicate) |
static <A,T,U,E extends Exception> |
pp(A a,
Throwables.TriPredicate<A,T,U,E> triPredicate) |
static <T,U,E extends Exception> |
pp(Throwables.BiPredicate<T,U,E> biPredicate) |
static <T,E extends Exception> |
pp(Throwables.Predicate<T,E> predicate) |
static <A,B,C,E extends Exception> |
pp(Throwables.TriPredicate<A,B,C,E> triPredicate) |
static <T> Consumer<T> |
println() |
static <T,U> BiConsumer<T,U> |
println(String separator) |
static Runnable |
r(Runnable runnable) |
static Callable<Void> |
r2c(Runnable runnable) |
static <R> Callable<R> |
r2c(Runnable runnable,
R valueToReturn) |
static <T> BinaryOperator<T> |
replacingMerger() |
static <T,C extends Collection<T>> |
reuse(IntFunction<? extends C> supplier)
Deprecated.
|
static <T,C extends Collection<T>> |
reuse(Supplier<? extends C> supplier)
Deprecated.
|
static <L,R> Function<Pair<L,R>,R> |
right() |
static <E extends Exception> |
rr(Throwables.Runnable<E> runnbale) |
static Runnable |
runnable(Runnable runnable)
Deprecated.
replaced by
r(Runnable) |
static <A,T> Consumer<T> |
sc(Object mutex,
A a,
BiConsumer<A,T> biConsumer)
Synchronized
Consumer. |
static <T,U> BiConsumer<T,U> |
sc(Object mutex,
BiConsumer<T,U> biConsumer)
Synchronized
BiConsumer. |
static <T> Consumer<T> |
sc(Object mutex,
Consumer<T> consumer)
Synchronized
Consumer. |
static <A,T,R> Function<T,R> |
sf(Object mutex,
A a,
BiFunction<A,T,R> biFunction)
Synchronized
Function. |
static <T,U,R> BiFunction<T,U,R> |
sf(Object mutex,
BiFunction<T,U,R> biFunction)
Synchronized
BiFunction. |
static <T,R> Function<T,R> |
sf(Object mutex,
Function<T,R> function)
Synchronized
Function. |
static <T extends Collection> |
size() |
static <T extends Map> |
sizeM() |
static <T> Consumer<T> |
sleep(long millis) |
static <T> Consumer<T> |
sleepUninterruptibly(long millis) |
static <A,T> Predicate<T> |
sp(Object mutex,
A a,
BiPredicate<A,T> biPredicate)
Synchronized
Predicate. |
static <A,B,T> Predicate<T> |
sp(Object mutex,
A a,
B b,
TriPredicate<A,B,T> triPredicate)
Synchronized
Predicate. |
static <T,U> BiPredicate<T,U> |
sp(Object mutex,
BiPredicate<T,U> biPredicate)
Synchronized
BiPredicate. |
static <T> Predicate<T> |
sp(Object mutex,
Predicate<T> predicate)
Synchronized
Predicate. |
static Predicate<String> |
startsWith(String prefix) |
static Function<String,String> |
strip() |
static Function<String,String> |
stripToEmpty() |
static Function<String,String> |
stripToNull() |
static Predicate<Class> |
subtypeOf(Class<?> clazz) |
static <K,V> Predicate<Map.Entry<K,V>> |
testByKey(Predicate<? super K> predicate)
Test by key.
|
static <K,V> Predicate<Map.Entry<K,V>> |
testByValue(Predicate<? super V> predicate)
Test by value.
|
static <K,V> Predicate<Map.Entry<K,V>> |
testKeyVal(BiPredicate<? super K,? super V> predicate)
Test key val.
|
static <T> Consumer<T> |
throwException(Supplier<? extends RuntimeException> excpetionSupplier) |
static <T> BinaryOperator<T> |
throwingMerger() |
static <T> Consumer<T> |
throwRuntimeException(String errorMessage) |
static <T> Predicate<T> |
timeLimit(Duration duration)
Returns a stateful
Predicate. |
static <T> Predicate<T> |
timeLimit(long timeInMillis)
Returns a stateful
Predicate. |
static Function<String,String> |
toCamelCase()
To camel case.
|
static Function<String,String> |
toLowerCase()
To lower case.
|
static Function<String,String> |
toLowerCaseWithUnderscore()
To lower case with underscore.
|
static Function<Throwable,RuntimeException> |
toRuntimeException() |
static <T> Function<T,String> |
toStr() |
static Function<String,String> |
toUpperCase()
To upper case.
|
static Function<String,String> |
toUpperCaseWithUnderscore()
To upper case with underscore.
|
static Function<String,String> |
trim() |
static Function<String,String> |
trimToEmpty() |
static Function<String,String> |
trimToNull() |
static <L,M,R> TriFunction<L,M,R,Triple<L,M,R>> |
triple() |
static <T> Function<T,Tuple.Tuple1<T>> |
tuple1() |
static <T,U> BiFunction<T,U,Tuple.Tuple2<T,U>> |
tuple2() |
static <A,B,C> TriFunction<A,B,C,Tuple.Tuple3<A,B,C>> |
tuple3() |
static <A,B,C,D> QuadFunction<A,B,C,D,Tuple.Tuple4<A,B,C,D>> |
tuple4() |
static <T> Function<Wrapper<T>,T> |
unwrap() |
static <K,T> Function<Keyed<K,T>,T> |
val() |
static <K,V> Function<Map.Entry<K,V>,V> |
value() |
static <T> Function<T,Wrapper<T>> |
wrap() |
static <T> Function<T,Wrapper<T>> |
wrap(ToIntFunction<? super T> hashFunction,
BiPredicate<? super T,? super T> equalsFunction) |
comparingArray, comparingBy, comparingBy, comparingByKey, comparingByKey, comparingByLength, comparingByMapSize, comparingBySize, comparingByValue, comparingByValue, comparingCollection, comparingDouble, comparingFloat, comparingIgnoreCase, comparingIgnoreCase, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsFirst, nullsLast, nullsLast, reversedComparingBy, reversedComparingByKey, reversedComparingByKey, reversedComparingByValue, reversedComparingByValue, reversedOrder, reversedOrderpublic static final IntFunction<Map<String,Object>> FACTORY_OF_MAP
public static final IntFunction<LinkedHashMap<String,Object>> FACTORY_OF_LINKED_HASH_MAP
public static final Supplier<LinkedHashMap<String,Object>> SUPPLIER_OF_LINKED_HASH_MAP
public static <T> T get(Supplier<T> supplier)
T - supplier - @Beta @Stateful public static <T> Supplier<T> memoize(Supplier<T> supplier)
Supplier which returns a single instance created by calling the specified supplier.get().T - supplier - @Beta @Stateful public static <T,R> Function<T,R> memoize(Function<? super T,? extends R> func)
T - R - func - @Stateful @Deprecated @Beta @SequentialOnly public static <T,C extends Collection<T>> Supplier<? extends C> reuse(Supplier<? extends C> supplier)
get is called.
Don't save the returned Collection object or use it to save objects.T - C - supplier - Stream.split/sliding};@Stateful @Deprecated @Beta @SequentialOnly public static <T,C extends Collection<T>> IntFunction<? extends C> reuse(IntFunction<? extends C> supplier)
get is called.
Don't save the returned Collection object or use it to save objects.T - C - supplier - Stream.split/sliding};public static Runnable close(AutoCloseable closeable)
closeable - @SafeVarargs public static Runnable closeAll(AutoCloseable... a)
a - public static Runnable closeAll(Collection<? extends AutoCloseable> c)
c - public static Runnable closeQuietly(AutoCloseable closeable)
closeable - @SafeVarargs public static Runnable closeAllQuietly(AutoCloseable... a)
a - public static Runnable closeAllQuietly(Collection<? extends AutoCloseable> c)
c - public static Runnable emptyAction()
public static <T> Consumer<T> doNothing()
T - public static <T> Consumer<T> throwRuntimeException(String errorMessage)
T - errorMessage - public static <T> Consumer<T> throwException(Supplier<? extends RuntimeException> excpetionSupplier)
T - excpetionSupplier - public static Function<Throwable,RuntimeException> toRuntimeException()
public static <T extends AutoCloseable> Consumer<T> close()
T - public static <T extends AutoCloseable> Consumer<T> closeQuietly()
T - public static <T> Consumer<T> sleep(long millis)
T - millis - public static <T> Consumer<T> sleepUninterruptibly(long millis)
T - millis - public static <T> Consumer<T> println()
T - public static <T,U> BiConsumer<T,U> println(String separator)
T - U - separator - public static Function<String,String> toLowerCaseWithUnderscore()
public static Function<String,String> toUpperCaseWithUnderscore()
public static <T> Function<T,T> identity()
T - public static <K,T> Function<T,Keyed<K,T>> keyed(Function<? super T,K> keyMapper)
K - the key typeT - keyMapper - public static <T,K,V> Function<Map.Entry<Keyed<K,T>,V>,T> kk()
T - K - the key typeV - the value typepublic static <T> Function<T,Wrapper<T>> wrap(ToIntFunction<? super T> hashFunction, BiPredicate<? super T,? super T> equalsFunction)
T - hashFunction - equalsFunction - public static <T> Function<Wrapper<T>,T> unwrap()
K - the key typeT - public static <K,V> Function<Map.Entry<K,V>,K> key()
K - the key typeV - the value typepublic static <K,V> Function<Map.Entry<K,V>,V> value()
K - the key typeV - the value typepublic static <K,V> Function<Map.Entry<K,V>,Map.Entry<V,K>> inverse()
K - the key typeV - the value typepublic static <K,V> BiFunction<K,V,Map.Entry<K,V>> entry()
K - the key typeV - the value type@Deprecated public static <K,V> Function<V,Map.Entry<K,V>> entry(K key)
Fn#entryWithKey(Object)K - the key typeV - the value typekey - @Deprecated public static <K,V> Function<V,Map.Entry<K,V>> entry(Function<? super V,K> keyMapper)
Fn#entryByKeyMapper(Function)K - the key typeV - the value typekeyMapper - public static <K,V> Function<V,Map.Entry<K,V>> entryWithKey(K key)
K - the key typeV - the value typekey - public static <K,V> Function<V,Map.Entry<K,V>> entryByKeyMapper(Function<? super V,K> keyMapper)
K - the key typeV - the value typekeyMapper - public static <K,V> Function<K,Map.Entry<K,V>> entryWithValue(V value)
K - the key typeV - the value typevalue - public static <K,V> Function<K,Map.Entry<K,V>> entryByValueMapper(Function<? super K,V> valueMapper)
K - the key typeV - the value typevalueMapper - public static <L,R> BiFunction<L,R,Pair<L,R>> pair()
L - R - public static <L,M,R> TriFunction<L,M,R,Triple<L,M,R>> triple()
L - M - R - public static <T> Function<T,Tuple.Tuple1<T>> tuple1()
T - public static <T,U> BiFunction<T,U,Tuple.Tuple2<T,U>> tuple2()
T - U - public static <A,B,C> TriFunction<A,B,C,Tuple.Tuple3<A,B,C>> tuple3()
A - B - C - public static <A,B,C,D> QuadFunction<A,B,C,D,Tuple.Tuple4<A,B,C,D>> tuple4()
A - B - C - D - @Deprecated public static <T> Function<List<T>,List<T>> nullToEmptyL()
nullToEmptyListT - public static <T> Function<List<T>,List<T>> nullToEmptyList()
T - @Deprecated public static <T> Function<Set<T>,Set<T>> nullToEmptyS()
nullToEmptySetT - public static <T> Function<Set<T>,Set<T>> nullToEmptySet()
T - @Deprecated public static <K,V> Function<Map<K,V>,Map<K,V>> nullToEmptyM()
nullToEmptyMapK - the key typeV - the value typepublic static <K,V> Function<Map<K,V>,Map<K,V>> nullToEmptyMap()
K - the key typeV - the value typepublic static <T extends CharSequence> Function<T,Integer> length()
T - public static <T extends Collection> Function<T,Integer> size()
T - public static <T,U> Function<T,U> cast(Class<U> clazz)
T - U - clazz - public static <T> Predicate<T> alwaysTrue()
T - public static <T> Predicate<T> alwaysFalse()
T - public static <T> Predicate<T> isNull()
T - public static <T> Predicate<T> isNull(Function<T,?> valueExtractor)
T - valueExtractor - public static <T extends CharSequence> Predicate<T> isNullOrEmpty()
T - public static <T> Predicate<T> isNullOrEmpty(Function<T,? extends CharSequence> valueExtractor)
T - valueExtractor - public static <T extends CharSequence> Predicate<T> isNullOrEmptyOrBlank()
T - public static <T> Predicate<T> isNullOrEmptyOrBlank(Function<T,? extends CharSequence> valueExtractor)
T - valueExtractor - @Beta public static <T extends Collection> Predicate<T> isNullOrEmptyC()
public static <T> Predicate<T> notNull()
T - public static <T> Predicate<T> notNull(Function<T,?> valueExtractor)
T - valueExtractor - public static <T extends CharSequence> Predicate<T> notNullOrEmpty()
T - public static <T> Predicate<T> notNullOrEmpty(Function<T,? extends CharSequence> valueExtractor)
T - valueExtractor - public static <T extends CharSequence> Predicate<T> notNullOrEmptyOrBlank()
T - public static <T> Predicate<T> notNullOrEmptyOrBlank(Function<T,? extends CharSequence> valueExtractor)
T - valueExtractor - @Beta public static <T extends Collection> Predicate<T> notNullOrEmptyC()
public static <T> Predicate<T> equal(Object target)
T - target - public static <T> Predicate<T> eqOr(Object targetValue1, Object targetValue2)
T - targetValue1 - targetValue2 - public static <T> Predicate<T> eqOr(Object targetValue1, Object targetValue2, Object targetValue3)
T - targetValue1 - targetValue2 - targetValue3 - public static <T> Predicate<T> notEqual(Object target)
T - target - public static <T extends Comparable<? super T>> Predicate<T> greaterThan(T target)
T - target - public static <T extends Comparable<? super T>> Predicate<T> greaterEqual(T target)
T - target - public static <T extends Comparable<? super T>> Predicate<T> lessThan(T target)
T - target - public static <T extends Comparable<? super T>> Predicate<T> lessEqual(T target)
T - target - public static <T extends Comparable<? super T>> Predicate<T> gtAndLt(T minValue, T maxValue)
minValue < e < maxValue.T - minValue - maxValue - public static <T extends Comparable<? super T>> Predicate<T> geAndLt(T minValue, T maxValue)
minValue <= e < maxValue.T - minValue - maxValue - public static <T extends Comparable<? super T>> Predicate<T> geAndLe(T minValue, T maxValue)
minValue <= e <= maxValue.T - minValue - maxValue - public static <T extends Comparable<? super T>> Predicate<T> gtAndLe(T minValue, T maxValue)
minValue < e <= maxValue.T - minValue - maxValue - @Deprecated public static <T extends Comparable<? super T>> Predicate<T> between(T minValue, T maxValue)
gtAndLt.minValue < e < maxValue.T - minValue - maxValue - public static <T> Predicate<T> in(Collection<?> c)
T - c - public static <T> Predicate<T> notIn(Collection<?> c)
T - c - public static <T> Predicate<T> instanceOf(Class<?> clazz)
T - clazz - public static Predicate<String> notStartsWith(String prefix)
prefix - public static Predicate<String> notEndsWith(String suffix)
suffix - public static Predicate<CharSequence> matches(Pattern pattern)
pattern - public static <T,U> BiPredicate<T,U> equal()
T - U - public static <T,U> BiPredicate<T,U> notEqual()
T - U - public static <T extends Comparable<? super T>> BiPredicate<T,T> greaterThan()
T - public static <T extends Comparable<? super T>> BiPredicate<T,T> greaterEqual()
T - public static <T extends Comparable<? super T>> BiPredicate<T,T> lessThan()
T - public static <T extends Comparable<? super T>> BiPredicate<T,T> lessEqual()
T - public static <T> Predicate<T> not(Predicate<T> predicate)
T - predicate - public static <T,U> BiPredicate<T,U> not(BiPredicate<T,U> biPredicate)
T - U - biPredicate - public static <A,B,C> TriPredicate<A,B,C> not(TriPredicate<A,B,C> triPredicate)
A - B - C - triPredicate - public static BooleanSupplier and(BooleanSupplier first, BooleanSupplier second)
first - second - public static BooleanSupplier and(BooleanSupplier first, BooleanSupplier second, BooleanSupplier third)
first - second - third - public static <T> Predicate<T> and(Predicate<? super T> first, Predicate<? super T> second)
T - first - second - public static <T> Predicate<T> and(Predicate<? super T> first, Predicate<? super T> second, Predicate<? super T> third)
T - first - second - third - public static <T> Predicate<T> and(Collection<Predicate<? super T>> c) throws IllegalArgumentException
T - c - IllegalArgumentException - if the specified c is null or empty.public static <T,U> BiPredicate<T,U> and(BiPredicate<? super T,? super U> first, BiPredicate<? super T,? super U> second)
T - U - first - second - public static <T,U> BiPredicate<T,U> and(BiPredicate<? super T,? super U> first, BiPredicate<? super T,? super U> second, BiPredicate<? super T,? super U> third)
T - U - first - second - third - public static <T,U> BiPredicate<T,U> and(List<BiPredicate<? super T,? super U>> c) throws IllegalArgumentException
T - U - c - IllegalArgumentException - if the specified c is null or empty.public static BooleanSupplier or(BooleanSupplier first, BooleanSupplier second)
first - second - public static BooleanSupplier or(BooleanSupplier first, BooleanSupplier second, BooleanSupplier third)
first - second - third - public static <T> Predicate<T> or(Predicate<? super T> first, Predicate<? super T> second)
T - first - second - public static <T> Predicate<T> or(Predicate<? super T> first, Predicate<? super T> second, Predicate<? super T> third)
T - first - second - third - public static <T> Predicate<T> or(Collection<Predicate<? super T>> c) throws IllegalArgumentException
T - c - IllegalArgumentException - if the specified c is null or empty.public static <T,U> BiPredicate<T,U> or(BiPredicate<? super T,? super U> first, BiPredicate<? super T,? super U> second)
T - U - first - second - public static <T,U> BiPredicate<T,U> or(BiPredicate<? super T,? super U> first, BiPredicate<? super T,? super U> second, BiPredicate<? super T,? super U> third)
T - U - first - second - third - public static <T,U> BiPredicate<T,U> or(List<BiPredicate<? super T,? super U>> c) throws IllegalArgumentException
T - U - c - IllegalArgumentException - if the specified c is null or empty.public static <K,V> Predicate<Map.Entry<K,V>> testByKey(Predicate<? super K> predicate)
K - the key typeV - the value typepredicate - public static <K,V> Predicate<Map.Entry<K,V>> testByValue(Predicate<? super V> predicate)
K - the key typeV - the value typepredicate - public static <K,V> Consumer<Map.Entry<K,V>> acceptByKey(Consumer<? super K> consumer)
K - the key typeV - the value typeconsumer - public static <K,V> Consumer<Map.Entry<K,V>> acceptByValue(Consumer<? super V> consumer)
K - the key typeV - the value typeconsumer - public static <K,V,R> Function<Map.Entry<K,V>,R> applyByKey(Function<? super K,R> func)
K - the key typeV - the value typeR - func - public static <K,V,R> Function<Map.Entry<K,V>,R> applyByValue(Function<? super V,R> func)
K - the key typeV - the value typeR - func - public static <A,B,R> Function<A,R> applyIfNotNullOrDefault(Function<A,B> mapperA, Function<B,R> mapperB, R defaultValue)
A - B - R - mapperA - mapperB - defaultValue - public static <A,B,C,R> Function<A,R> applyIfNotNullOrDefault(Function<A,B> mapperA, Function<B,C> mapperB, Function<C,R> mapperC, R defaultValue)
A - B - C - R - mapperA - mapperB - mapperC - defaultValue - public static <A,B,C,D,R> Function<A,R> applyIfNotNullOrDefault(Function<A,B> mapperA, Function<B,C> mapperB, Function<C,D> mapperC, Function<D,R> mapperD, R defaultValue)
A - B - C - D - R - mapperA - mapperB - mapperC - mapperD - defaultValue - public static <A,B,R> Function<A,R> applyIfNotNullOrGet(Function<A,B> mapperA, Function<B,R> mapperB, Supplier<R> supplier)
A - B - R - mapperA - mapperB - supplier - public static <A,B,C,R> Function<A,R> applyIfNotNullOrGet(Function<A,B> mapperA, Function<B,C> mapperB, Function<C,R> mapperC, Supplier<R> supplier)
A - B - C - R - mapperA - mapperB - mapperC - supplier - public static <A,B,C,D,R> Function<A,R> applyIfNotNullOrGet(Function<A,B> mapperA, Function<B,C> mapperB, Function<C,D> mapperC, Function<D,R> mapperD, Supplier<R> supplier)
A - B - C - D - R - mapperA - mapperB - mapperC - mapperD - supplier - public static <K,V,KK> Function<Map.Entry<K,V>,Map.Entry<KK,V>> mapKey(Function<? super K,? extends KK> func)
K - the key typeV - the value typeKK - func - public static <K,V,VV> Function<Map.Entry<K,V>,Map.Entry<K,VV>> mapValue(Function<? super V,? extends VV> func)
K - the key typeV - the value typeVV - func - public static <K,V> Predicate<Map.Entry<K,V>> testKeyVal(BiPredicate<? super K,? super V> predicate)
K - the key typeV - the value typepredicate - public static <K,V> Consumer<Map.Entry<K,V>> acceptKeyVal(BiConsumer<? super K,? super V> consumer)
K - the key typeV - the value typeconsumer - public static <K,V,R> Function<Map.Entry<K,V>,R> applyKeyVal(BiFunction<? super K,? super V,R> func)
K - the key typeV - the value typeR - func - public static <K,V> Function<? super Map<K,? extends Collection<? extends V>>,List<Map<K,V>>> flatToMap()
K - the key typeV - the value typeMaps.flatToMap(Map)public static Function<String,Number> createNumber()
Numbers.createNumber(String)public static <T extends Number> ToIntFunction<T> numToInt()
T - public static <T extends Number> ToLongFunction<T> numToLong()
T - public static <T extends Number> ToDoubleFunction<T> numToDouble()
T - @Beta @Stateful public static <T> Predicate<T> limitThenFilter(int limit, Predicate<T> predicate)
Predicate. Don't save or cache for reuse or use it in parallel stream.T - limit - predicate - @Beta @Stateful public static <T,U> BiPredicate<T,U> limitThenFilter(int limit, BiPredicate<T,U> predicate)
Predicate. Don't save or cache for reuse or use it in parallel stream.T - U - limit - predicate - @Beta @Stateful public static <T> Predicate<T> filterThenLimit(Predicate<T> predicate, int limit)
Predicate. Don't save or cache for reuse or use it in parallel stream.T - predicate - limit - @Beta @Stateful public static <T,U> BiPredicate<T,U> filterThenLimit(BiPredicate<T,U> predicate, int limit)
Predicate. Don't save or cache for reuse or use it in parallel stream.T - U - predicate - limit - @Beta @Stateful public static <T> Predicate<T> timeLimit(long timeInMillis)
Predicate. Don't save or cache for reuse or use it in parallel stream.T - timeInMillis - @Beta @Stateful public static <T> Predicate<T> timeLimit(Duration duration)
Predicate. Don't save or cache for reuse or use it in parallel stream.T - duration - @Beta @SequentialOnly @Stateful public static <T> Function<T,Indexed<T>> indexed()
Predicate. Don't save or cache for reuse or use it in parallel stream.T - @Beta @SequentialOnly @Stateful public static <T> Predicate<T> indexed(IndexedPredicate<T> predicate)
Predicate. Don't save or cache for reuse or use it in parallel stream.T - predicate - public static <T extends Comparable<? super T>> Function<T,Integer> compareTo(T target)
T - target - public static <T> Function<T,Integer> compareTo(T target, Comparator<? super T> cmp)
T - target - cmp - public static <T extends Comparable<? super T>> BiFunction<T,T,Integer> compare()
T - public static <T> BiFunction<T,T,Integer> compare(Comparator<? super T> cmp)
T - cmp - @Beta public static <T> Function<Future<T>,T> futureGetOrDefaultOnError(T defaultValue)
T - defaultValue - @Beta public static <T> Predicate<T> p(Predicate<T> predicate)
T - predicate - @Beta public static <A,T> Predicate<T> p(A a, BiPredicate<A,T> biPredicate)
A - T - a - biPredicate - @Beta public static <A,B,T> Predicate<T> p(A a, B b, TriPredicate<A,B,T> triPredicate)
A - B - T - a - b - triPredicate - @Beta public static <T,U> BiPredicate<T,U> p(BiPredicate<T,U> biPredicate)
T - U - biPredicate - @Beta public static <A,T,U> BiPredicate<T,U> p(A a, TriPredicate<A,T,U> triPredicate)
A - T - U - a - triPredicate - @Beta public static <A,B,C> TriPredicate<A,B,C> p(TriPredicate<A,B,C> triPredicate)
A - B - C - triPredicate - @Beta public static <T> Consumer<T> c(Consumer<T> predicate)
T - predicate - @Beta public static <A,T> Consumer<T> c(A a, BiConsumer<A,T> biConsumer)
A - T - a - biConsumer - @Beta public static <A,B,T> Consumer<T> c(A a, B b, TriConsumer<A,B,T> triConsumer)
A - B - T - a - b - triConsumer - @Beta public static <T,U> BiConsumer<T,U> c(BiConsumer<T,U> biConsumer)
T - U - biConsumer - @Beta public static <A,T,U> BiConsumer<T,U> c(A a, TriConsumer<A,T,U> triConsumer)
A - T - U - a - triConsumer - @Beta public static <A,B,C> TriConsumer<A,B,C> c(TriConsumer<A,B,C> triConsumer)
A - B - C - triConsumer - @Beta public static <T,R> Function<T,R> f(Function<T,R> predicate)
T - R - predicate - @Beta public static <A,T,R> Function<T,R> f(A a, BiFunction<A,T,R> biFunction)
A - T - R - a - biFunction - @Beta public static <A,B,T,R> Function<T,R> f(A a, B b, TriFunction<A,B,T,R> triFunction)
A - B - T - R - a - b - triFunction - @Beta public static <T,U,R> BiFunction<T,U,R> f(BiFunction<T,U,R> biFunction)
T - U - R - biFunction - @Beta public static <A,T,U,R> BiFunction<T,U,R> f(A a, TriFunction<A,T,U,R> triFunction)
A - T - U - R - a - triFunction - @Beta public static <A,B,C,R> TriFunction<A,B,C,R> f(TriFunction<A,B,C,R> triFunction)
A - B - C - R - triFunction - @Beta public static <T,E extends Exception> Predicate<T> pp(Throwables.Predicate<T,E> predicate)
T - E - predicate - @Beta public static <A,T,E extends Exception> Predicate<T> pp(A a, Throwables.BiPredicate<A,T,E> biPredicate)
A - T - E - a - biPredicate - @Beta public static <A,B,T,E extends Exception> Predicate<T> pp(A a, B b, Throwables.TriPredicate<A,B,T,E> triPredicate)
A - B - T - E - a - b - triPredicate - @Beta public static <T,U,E extends Exception> BiPredicate<T,U> pp(Throwables.BiPredicate<T,U,E> biPredicate)
T - U - E - biPredicate - @Beta public static <A,T,U,E extends Exception> BiPredicate<T,U> pp(A a, Throwables.TriPredicate<A,T,U,E> triPredicate)
A - T - U - E - a - triPredicate - @Beta public static <A,B,C,E extends Exception> TriPredicate<A,B,C> pp(Throwables.TriPredicate<A,B,C,E> triPredicate)
A - B - C - E - triPredicate - @Beta public static <T,E extends Exception> Consumer<T> cc(Throwables.Consumer<T,E> consumer)
T - E - consumer - @Beta public static <A,T,E extends Exception> Consumer<T> cc(A a, Throwables.BiConsumer<A,T,E> biConsumer)
A - T - E - a - biConsumer - @Beta public static <A,B,T,E extends Exception> Consumer<T> cc(A a, B b, Throwables.TriConsumer<A,B,T,E> triConsumer)
A - B - T - E - a - b - triConsumer - @Beta public static <T,U,E extends Exception> BiConsumer<T,U> cc(Throwables.BiConsumer<T,U,E> biConsumer)
T - U - E - biConsumer - @Beta public static <A,T,U,E extends Exception> BiConsumer<T,U> cc(A a, Throwables.TriConsumer<A,T,U,E> triConsumer)
A - T - U - E - a - triConsumer - @Beta public static <A,B,C,E extends Exception> TriConsumer<A,B,C> cc(Throwables.TriConsumer<A,B,C,E> triConsumer)
A - B - C - E - triConsumer - @Beta public static <T,R,E extends Exception> Function<T,R> ff(Throwables.Function<T,R,E> function)
T - R - E - function - @Beta public static <T,R,E extends Exception> Function<T,R> ff(Throwables.Function<T,R,E> function, R defaultOnError)
T - R - E - function - defaultOnError - @Beta public static <A,T,R,E extends Exception> Function<T,R> ff(A a, Throwables.BiFunction<A,T,R,E> biFunction)
A - T - R - E - a - biFunction - @Beta public static <A,B,T,R,E extends Exception> Function<T,R> ff(A a, B b, Throwables.TriFunction<A,B,T,R,E> triFunction)
A - B - T - R - E - a - b - triFunction - @Beta public static <T,U,R,E extends Exception> BiFunction<T,U,R> ff(Throwables.BiFunction<T,U,R,E> biFunction)
T - U - R - E - biFunction - @Beta public static <T,U,R,E extends Exception> BiFunction<T,U,R> ff(Throwables.BiFunction<T,U,R,E> biFunction, R defaultOnError)
T - U - R - E - biFunction - defaultOnError - @Beta public static <A,T,U,R,E extends Exception> BiFunction<T,U,R> ff(A a, Throwables.TriFunction<A,T,U,R,E> triFunction)
A - T - U - R - E - a - triFunction - @Beta public static <A,B,C,R,E extends Exception> TriFunction<A,B,C,R> ff(Throwables.TriFunction<A,B,C,R,E> triFunction)
A - B - C - R - E - triFunction - @Beta public static <A,B,C,R,E extends Exception> TriFunction<A,B,C,R> ff(Throwables.TriFunction<A,B,C,R,E> triFunction, R defaultOnError)
A - B - C - R - E - triFunction - defaultOnError - @Beta public static <T> Predicate<T> sp(Object mutex, Predicate<T> predicate)
Predicate.T - mutex - to synchronized onpredicate - @Beta public static <A,T> Predicate<T> sp(Object mutex, A a, BiPredicate<A,T> biPredicate)
Predicate.A - T - mutex - to synchronized ona - biPredicate - @Beta public static <A,B,T> Predicate<T> sp(Object mutex, A a, B b, TriPredicate<A,B,T> triPredicate)
Predicate.A - B - T - mutex - to synchronized ona - b - triPredicate - @Beta public static <T,U> BiPredicate<T,U> sp(Object mutex, BiPredicate<T,U> biPredicate)
BiPredicate.T - U - mutex - to synchronized onbiPredicate - @Beta public static <T> Consumer<T> sc(Object mutex, Consumer<T> consumer)
Consumer.T - mutex - to synchronized onconsumer - @Beta public static <A,T> Consumer<T> sc(Object mutex, A a, BiConsumer<A,T> biConsumer)
Consumer.A - T - mutex - to synchronized ona - biConsumer - @Beta public static <T,U> BiConsumer<T,U> sc(Object mutex, BiConsumer<T,U> biConsumer)
BiConsumer.T - U - mutex - to synchronized onbiConsumer - @Beta public static <T,R> Function<T,R> sf(Object mutex, Function<T,R> function)
Function.T - R - mutex - to synchronized onfunction - @Beta public static <A,T,R> Function<T,R> sf(Object mutex, A a, BiFunction<A,T,R> biFunction)
Function.A - T - R - mutex - to synchronized ona - biFunction - @Beta public static <T,U,R> BiFunction<T,U,R> sf(Object mutex, BiFunction<T,U,R> biFunction)
BiFunction.T - U - R - mutex - to synchronized onbiFunction - public static <T,U> BiFunction<T,U,Void> c2f(BiConsumer<? super T,? super U> action)
public static <T,U,R> BiFunction<T,U,R> c2f(BiConsumer<? super T,? super U> action, R valueToReturn)
public static <A,B,C> TriFunction<A,B,C,Void> c2f(TriConsumer<? super A,? super B,? super C> action)
public static <A,B,C,R> TriFunction<A,B,C,R> c2f(TriConsumer<? super A,? super B,? super C> action, R valueToReturn)
public static <T> Consumer<T> f2c(Function<? super T,?> func)
Consumer which calls the specified func.T - func - public static <T,U> BiConsumer<T,U> f2c(BiFunction<? super T,? super U,?> func)
public static <A,B,C> TriConsumer<A,B,C> f2c(TriFunction<? super A,? super B,? super C,?> func)
public static <E extends Exception> Runnable rr(Throwables.Runnable<E> runnbale)
public static <R,E extends Exception> Callable<R> cc(Throwables.Callable<R,E> callable)
public static <R> Callable<R> r2c(Runnable runnable, R valueToReturn)
runnable - valueToReturn - public static <R> Runnable c2r(Callable<R> callable)
R - callable - public static <R> Callable<R> c(Callable<R> callable)
R - callable - @Deprecated public static Runnable runnable(Runnable runnable)
r(Runnable)runnable - @Deprecated public static <R> Callable<R> callable(Callable<R> callable)
c(Callable)R - callable - public static <T> BinaryOperator<T> throwingMerger()
T - public static <T> BinaryOperator<T> ignoringMerger()
T - public static <T> BinaryOperator<T> replacingMerger()
T - @Beta @SequentialOnly @Stateful public static <T> BiFunction<T,T,MergeResult> alternated()
BiFunction. Don't save or cache for reuse or use it in parallel stream.T - Copyright © 2021. All rights reserved.