Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testFindLast_intStream (0.21 sec)

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

        // no way to find out the stream is empty without walking its spliterator
        assertThat(findLast(list.stream().filter(i -> i < 0))).isEmpty();
      }
    
      public void testFindLast_intStream() {
        assertThat(findLast(IntStream.of())).isEqualTo(OptionalInt.empty());
        assertThat(findLast(IntStream.of(1, 2, 3, 4, 5))).isEqualTo(OptionalInt.of(5));
    
        // test with a large, not-subsized Spliterator
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 20K bytes
    - Viewed (0)
Back to top