-
public final class CommonExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static <T1 extends Any, T2 extends Any, R extends Any> RifNotNull(T1 t1, T2 t2, Function2<T1, T2, R> onNotNull)Calls the specified function block with t1 and t2 as its arguments if t1 and t2 are not null. final static <T1 extends Any, T2 extends Any, T3 extends Any, R extends Any> RifNotNull(T1 t1, T2 t2, T3 t3, Function3<T1, T2, T3, R> onNotNull)Calls the specified function block with t1, t2, and t3 as its arguments if t1, t2, and t3 are not null. -
-
Method Detail
-
ifNotNull
final static <T1 extends Any, T2 extends Any, R extends Any> R ifNotNull(T1 t1, T2 t2, Function2<T1, T2, R> onNotNull)
Calls the specified function block with t1 and t2 as its arguments if t1 and t2 are not null. Returns the function block’s result if it was called, and
nullif it wasn’t.
-
ifNotNull
final static <T1 extends Any, T2 extends Any, T3 extends Any, R extends Any> R ifNotNull(T1 t1, T2 t2, T3 t3, Function3<T1, T2, T3, R> onNotNull)
Calls the specified function block with t1, t2, and t3 as its arguments if t1, t2, and t3 are not null. Returns the function block’s result if it was called, and
nullif it wasn’t.
-
-
-
-