Code example for NavigableSet

Methods: first

0
  } 
 
  @CollectionSize.Require(ZERO) 
  public void testEmptySetFirst() { 
    try { 
      navigableSet.first();
      fail(); 
    } catch (NoSuchElementException e) {
    } 
  } 
 
  @CollectionFeature.Require(SUPPORTS_REMOVE) 
  @CollectionSize.Require(ZERO) 
  public void testEmptySetPollFirst() { 
    assertNull(navigableSet.pollFirst());
  } 
 
  @CollectionSize.Require(ZERO) 
  public void testEmptySetNearby() { 
    assertNull(navigableSet.lower(samples.e0));