Class PresentKit

java.lang.Object
com.iohao.net.common.kit.PresentKit

public class PresentKit extends Object
PresentKit
Author:
渔民小镇
date:
2023-06-01
  • Constructor Details

    • PresentKit

      public PresentKit()
  • Method Details

    • ifNull

      public void ifNull(Object value, Runnable action)
      If a value is null, performs the given action with the value, otherwise does nothing.
      Parameters:
      value - value
      action - the action to be performed, if a value is null
    • ifPresent

      public <T> void ifPresent(T value, Consumer<T> action)
      If a value is present, performs the given action with the value, otherwise does nothing.
      Parameters:
      value - value
      action - the action to be performed, if a value is present
      Since:
      21.8