If a mod object is present, invoke the specified consumer with the object, otherwise do nothing. @param consumer block to be executed if a mod object is present @throws NullPointerException if mod object is present and consumer is null
(Consumer<? super T> consumer)
| 101 | * null |
| 102 | */ |
| 103 | public void ifPresent(Consumer<? super T> consumer) { |
| 104 | if (getValue() != null) |
| 105 | consumer.accept(getValue()); |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * If a mod object is present, and the mod object matches the given predicate, |
no test coverage detected