Code example for SortedMultiset

Methods: entrySetpollLastEntry

0
 
  @SuppressWarnings("unchecked") 
  @CollectionFeature.Require(SUPPORTS_REMOVE) 
  @CollectionSize.Require(SEVERAL) 
  public void testPollLast() { 
    assertEquals(c, sortedMultiset.pollLastEntry());
    assertEquals(Arrays.asList(a, b), copyToList(sortedMultiset.entrySet()));
  } 
 
  @CollectionFeature.Require(absent = SUPPORTS_REMOVE) 
  @CollectionSize.Require(SEVERAL) 
  public void testPollLastUnsupported() { 
    try { 
      sortedMultiset.pollLastEntry();
      fail(); 
    } catch (UnsupportedOperationException e) {}
  } 
 
  @CollectionSize.Require(SEVERAL) 
  public void testDescendingNavigation() {