Class PresentKit
java.lang.Object
com.iohao.net.common.kit.PresentKit
Null-presence conditional execution utilities.
- Author:
- 渔民小镇
- date:
- 2023-06-01
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidIf a value is null, performs the given action with the value, otherwise does nothing.static <T> voidIf a value is present, performs the given action with the value, otherwise does nothing.
-
Method Details
-
ifNull
-
ifPresent
If a value is present, performs the given action with the value, otherwise does nothing.- Parameters:
value- valueaction- the action to be performed, if a value is present- Since:
- 21.8
-