Code example for SortedMultiset

Methods: pollLastEntry

0
  } 
 
  @CollectionFeature.Require(SUPPORTS_REMOVE) 
  @CollectionSize.Require(ZERO) 
  public void testEmptyMultisetPollLast() { 
    assertNull(sortedMultiset.pollLastEntry());
  } 
 
  @CollectionSize.Require(ONE) 
  public void testSingletonMultisetFirst() { 
    assertEquals(a, sortedMultiset.firstEntry());
  } 
 
  @CollectionFeature.Require(SUPPORTS_REMOVE) 
  @CollectionSize.Require(ONE) 
  public void testSingletonMultisetPollFirst() { 
    assertEquals(a, sortedMultiset.pollFirstEntry());
    assertTrue(sortedMultiset.isEmpty());
  } 
 
Experience pair programming with AI  Get Codota for Java