public final class Procedures2 extends Object
Procedure2
instances.Modifier and Type | Field | Description |
---|---|---|
static Procedure2<?,?> |
ADD_TO_COLLECTION |
|
static Procedure2<?,?> |
REMOVE_FROM_COLLECTION |
Modifier and Type | Method | Description |
---|---|---|
static <T> Procedure2<T,Collection<T>> |
addToCollection() |
|
static <T,P> Procedure2<T,P> |
fromProcedure(Procedure<? super T> procedure) |
|
static <T> Procedure2<T,Collection<T>> |
removeFromCollection() |
|
static <T> Procedure2<DoubleSummaryStatistics,T> |
summarizeDouble(DoubleFunction<? super T> function) |
|
static <T> Procedure2<DoubleSummaryStatistics,T> |
summarizeFloat(FloatFunction<? super T> function) |
|
static <T> Procedure2<IntSummaryStatistics,T> |
summarizeInt(IntFunction<? super T> function) |
|
static <T> Procedure2<LongSummaryStatistics,T> |
summarizeLong(LongFunction<? super T> function) |
|
static <T,P> Procedure2<T,P> |
throwing(ThrowingProcedure2<T,P> throwingProcedure2) |
Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a
Procedure2 that will throw a RuntimeException, wrapping the checked exception that is the cause.
|
static <T1,T2> Procedure2<T1,T2> |
throwing(ThrowingProcedure2<T1,T2> throwingProcedure,
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
Procedure2 that will throw a user specified RuntimeException based on the provided function.
|
public static final Procedure2<?,?> ADD_TO_COLLECTION
public static final Procedure2<?,?> REMOVE_FROM_COLLECTION
public static <T,P> Procedure2<T,P> throwing(ThrowingProcedure2<T,P> throwingProcedure2)
public static <T1,T2> Procedure2<T1,T2> throwing(ThrowingProcedure2<T1,T2> throwingProcedure, Function3<T1,T2,? super Throwable,? extends RuntimeException> rethrow)
public static <T,P> Procedure2<T,P> fromProcedure(Procedure<? super T> procedure)
public static <T> Procedure2<T,Collection<T>> addToCollection()
public static <T> Procedure2<T,Collection<T>> removeFromCollection()
public static <T> Procedure2<DoubleSummaryStatistics,T> summarizeDouble(DoubleFunction<? super T> function)
public static <T> Procedure2<DoubleSummaryStatistics,T> summarizeFloat(FloatFunction<? super T> function)
public static <T> Procedure2<IntSummaryStatistics,T> summarizeInt(IntFunction<? super T> function)
public static <T> Procedure2<LongSummaryStatistics,T> summarizeLong(LongFunction<? super T> function)
Copyright © 2004–2019. All rights reserved.