Code example for NavigableSet

Methods: last

0
  } 
 
  @CollectionSize.Require(ZERO) 
  public void testEmptySetLast() { 
    try { 
      navigableSet.last();
      fail(); 
    } catch (NoSuchElementException e) {
    } 
  } 
 
  @CollectionFeature.Require(SUPPORTS_REMOVE) 
  @CollectionSize.Require(ZERO) 
  public void testEmptySetPollLast() { 
    assertNull(navigableSet.pollLast());
  } 
 
  @CollectionSize.Require(ONE) 
  public void testSingletonSetFirst() { 
    assertEquals(a, navigableSet.first());
Experience pair programming with AI  Get Codota for Java