public final class Functions2
extends java.lang.Object
Function2
instances.Modifier and Type | Method | Description |
---|---|---|
static <T,V,P> Function2<T,P,V> |
fromFunction(Function<? super T,? extends V> function) |
|
static Function2<java.lang.Integer,java.lang.Integer,java.lang.Integer> |
integerAddition() |
|
static <T> Function2<T,T,T> |
max(java.util.Comparator<? super T> comparator) |
|
static <T,V extends java.lang.Comparable<? super V>> |
maxBy(Function<? super T,? extends V> function) |
|
static <T> Function2<T,T,T> |
min(java.util.Comparator<? super T> comparator) |
|
static <T,V extends java.lang.Comparable<? super V>> |
minBy(Function<? super T,? extends V> function) |
|
static <T,V,P> Function2<T,P,V> |
throwing(ThrowingFunction2<T,P,V> throwingFunction2) |
Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a
Function2 that will throw a RuntimeException, wrapping the checked exception that is the cause.
|
static <T1,T2,V> Function2<T1,T2,V> |
throwing(ThrowingFunction2<T1,T2,V> throwingFunction2,
Function3<T1,T2,? super java.lang.Throwable,? extends java.lang.RuntimeException> rethrow) |
Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a
Function2 that will throw a user specified RuntimeException based on the provided function.
|
public static <T,V,P> Function2<T,P,V> fromFunction(Function<? super T,? extends V> function)
public static <T,V,P> Function2<T,P,V> throwing(ThrowingFunction2<T,P,V> throwingFunction2)
public static <T1,T2,V> Function2<T1,T2,V> throwing(ThrowingFunction2<T1,T2,V> throwingFunction2, Function3<T1,T2,? super java.lang.Throwable,? extends java.lang.RuntimeException> rethrow)
public static Function2<java.lang.Integer,java.lang.Integer,java.lang.Integer> integerAddition()
public static <T> Function2<T,T,T> min(java.util.Comparator<? super T> comparator)
public static <T> Function2<T,T,T> max(java.util.Comparator<? super T> comparator)
public static <T,V extends java.lang.Comparable<? super V>> Function2<T,T,T> minBy(Function<? super T,? extends V> function)
Copyright © 2004–2018. All rights reserved.