Modifier and Type | Method | Description |
---|---|---|
static <T,V,P> Function2<T,P,V> |
fromFunction(Function<? super T,? extends V> function) |
|
static Function2<Integer,Integer,Integer> |
integerAddition() |
|
static <T> Function2<T,T,T> |
max(Comparator<? super T> comparator) |
|
static <T,V extends Comparable<? super V>> |
maxBy(Function<? super T,? extends V> function) |
|
static <T> Function2<T,T,T> |
min(Comparator<? super T> comparator) |
|
static <T,V extends 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 Throwable,? extends 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 Throwable,? extends RuntimeException> rethrow)
public static <T> Function2<T,T,T> min(Comparator<? super T> comparator)
public static <T> Function2<T,T,T> max(Comparator<? super T> comparator)
public static <T,V extends Comparable<? super V>> Function2<T,T,T> minBy(Function<? super T,? extends V> function)
public static <T,V extends Comparable<? super V>> Function2<T,T,T> maxBy(Function<? super T,? extends V> function)
Copyright © 2004–2017. All rights reserved.