Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testCycleWhenRemoveIsNotSupported (0.09 sec)

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

        Iterator<String> cycle = Iterators.cycle("a", "b");
        cycle.next();
        cycle.remove();
        assertThrows(IllegalStateException.class, () -> cycle.remove());
      }
    
      public void testCycleWhenRemoveIsNotSupported() {
        Iterable<String> iterable = asList("a", "b");
        Iterator<String> cycle = Iterators.cycle(iterable);
        cycle.next();
        assertThrows(UnsupportedOperationException.class, () -> cycle.remove());
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 18:44:53 UTC 2025
    - 56.7K bytes
    - Viewed (0)
Back to top