Code example for SortedMultiset

Methods: pollLastEntryisEmpty

0
  } 
 
  @CollectionFeature.Require(SUPPORTS_REMOVE) 
  @CollectionSize.Require(ONE) 
  public void testSingletonMultisetPollLast() { 
    assertEquals(a, sortedMultiset.pollLastEntry());
    assertTrue(sortedMultiset.isEmpty());
  } 
 
  @CollectionSize.Require(SEVERAL) 
  public void testFirst() { 
    assertEquals(a, sortedMultiset.firstEntry());
  } 
 
  @SuppressWarnings("unchecked") 
  @CollectionFeature.Require(SUPPORTS_REMOVE) 
  @CollectionSize.Require(SEVERAL) 
  public void testPollFirst() { 
    assertEquals(a, sortedMultiset.pollFirstEntry());
    assertEquals(Arrays.asList(b, c), copyToList(sortedMultiset.entrySet()));
Contextual code suggestions in your IDE  Get Codota for Java