Code example for SortedMultiset

Methods: entrySetpollFirstEntry

0
 
  @SuppressWarnings("unchecked") 
  @CollectionFeature.Require(SUPPORTS_REMOVE) 
  @CollectionSize.Require(SEVERAL) 
  public void testPollFirst() { 
    assertEquals(a, sortedMultiset.pollFirstEntry());
    assertEquals(Arrays.asList(b, c), copyToList(sortedMultiset.entrySet()));
  } 
 
  @CollectionFeature.Require(absent = SUPPORTS_REMOVE) 
  public void testPollFirstUnsupported() { 
    try { 
      sortedMultiset.pollFirstEntry();
      fail(); 
    } catch (UnsupportedOperationException e) {}
  } 
 
  @CollectionSize.Require(SEVERAL) 
  public void testLower() { 
    resetWithHole();