Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testToOptionalSingleton (0.22 sec)

  1. guava-tests/test/com/google/common/collect/MoreCollectorsTest.java

    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public class MoreCollectorsTest extends TestCase {
      public void testToOptionalEmpty() {
        assertThat(Stream.empty().collect(toOptional())).isEmpty();
      }
    
      public void testToOptionalSingleton() {
        assertThat(Stream.of(1).collect(toOptional())).hasValue(1);
      }
    
      public void testToOptionalNull() {
        Stream<@Nullable Object> stream = Stream.of((Object) null);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 3.2K bytes
    - Viewed (0)
Back to top