Code example for NavigableSet

Methods: pollLastisEmpty

0
  } 
 
  @CollectionFeature.Require(SUPPORTS_REMOVE) 
  @CollectionSize.Require(ONE) 
  public void testSingletonSetPollLast() { 
    assertEquals(a, navigableSet.pollLast());
    assertTrue(navigableSet.isEmpty());
  } 
 
  @CollectionSize.Require(SEVERAL) 
  public void testFirst() { 
    assertEquals(a, navigableSet.first());
  } 
 
  @CollectionFeature.Require(SUPPORTS_REMOVE) 
  @CollectionSize.Require(SEVERAL) 
  public void testPollFirst() { 
    assertEquals(a, navigableSet.pollFirst());
    assertEquals( 
        values.subList(1, values.size()), Helpers.copyToList(navigableSet));
Experience pair programming with AI  Get Codota for Java