- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for hasValue (0.17 sec)
-
guava-tests/test/com/google/common/collect/MoreCollectorsTest.java
assertThat(Stream.empty().collect(MoreCollectors.toOptional())).isEmpty(); } public void testToOptionalSingleton() { assertThat(Stream.of(1).collect(MoreCollectors.toOptional())).hasValue(1); } public void testToOptionalNull() { Stream<@Nullable Object> stream = Stream.of((Object) null); try { stream.collect(MoreCollectors.toOptional()); fail("Expected NullPointerException");
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Mar 07 18:34:03 GMT 2024 - 3.4K bytes - Viewed (0)