Interface ApplyIfNotNull


  • public interface ApplyIfNotNull
    Most facet than interface, The ApplyIfNotNull interface allow to prevent NullPopinterException.
    Since:
    15 janv. 2018
    • Method Detail

      • applyIfNotNull

        default <T> void applyIfNotNull​(T data,
                                        Consumer<T> consumer)
      • applyIfNotNull

        default <T> void applyIfNotNull​(T data,
                                        T defaultValue,
                                        Consumer<T> consumer)