Code example for SortedMultiset

Methods: elementSetfirstEntry

0
    sortedMultiset = (SortedMultiset<E>) getMultiset();
  } 
 
  @CollectionSize.Require(ZERO) 
  public void testEmptyMultisetFirst() { 
    assertNull(sortedMultiset.firstEntry());
    try { 
      sortedMultiset.elementSet().first();
      fail(); 
    } catch (NoSuchElementException e) {}
  } 
 
  @CollectionFeature.Require(SUPPORTS_REMOVE) 
  @CollectionSize.Require(ZERO) 
  public void testEmptyMultisetPollFirst() { 
    assertNull(sortedMultiset.pollFirstEntry());
  } 
 
  @CollectionSize.Require(ZERO) 
  public void testEmptyMultisetNearby() { 
Experience pair programming with AI  Get Codota for Java