Code example for NavigableSet

Methods: pollLast

0
  } 
 
  @CollectionFeature.Require(SUPPORTS_REMOVE) 
  @CollectionSize.Require(SEVERAL) 
  public void testPollLast() { 
    assertEquals(c, navigableSet.pollLast());
    assertEquals( 
        values.subList(0, values.size() - 1), Helpers.copyToList(navigableSet));
  } 
 
  @CollectionFeature.Require(absent = SUPPORTS_REMOVE) 
  public void testPollLastUnsupported() { 
    try { 
      navigableSet.pollLast();
      fail(); 
    } catch (UnsupportedOperationException e) {
    } 
  } 
 
  @CollectionSize.Require(SEVERAL) 
Experience pair programming with AI  Get Codota for Java