Searched refs:ifPresent (Results 1 – 8 of 8) sorted by relevance
51 OptionalInt.empty().ifPresent(alwaysFails); in testIfPresent()55 OptionalInt.of(56).ifPresent(recorder); in testIfPresent()
51 OptionalLong.empty().ifPresent(alwaysFails); in testIfPresent()55 OptionalLong.of(56).ifPresent(recorder); in testIfPresent()
53 OptionalDouble.empty().ifPresent(alwaysFails); in testIfPresent()57 OptionalDouble.of(56.0).ifPresent(recorder); in testIfPresent()
74 empty.ifPresent(alwaysFail); in testIfPresent()75 ofNull.ifPresent(alwaysFail); in testIfPresent()80 Optional.of(foo).ifPresent(s -> reference.set(s)); in testIfPresent()
136 public void ifPresent(IntConsumer consumer) { in ifPresent() method in OptionalInt
136 public void ifPresent(LongConsumer consumer) { in ifPresent() method in OptionalLong
136 public void ifPresent(DoubleConsumer consumer) { in ifPresent() method in OptionalDouble
153 public void ifPresent(Consumer<? super T> consumer) { in ifPresent() method in Optional