Package 

Class CommonExtensionsKt

    • Method Summary

      Modifier and Type Method Description
      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.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 null if 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 null if it wasn’t.