Code example for SortedMultiset

Methods: entrySetiteratorisEmptysizetoArray

0
    testEmptyRangeSubMultiset(sortedMultiset.subMultiset(b.getElement(), OPEN, a.getElement(),
        OPEN));
  } 
 
  public void testEmptyRangeSubMultiset(SortedMultiset<E> multiset) {
    assertTrue(multiset.isEmpty());
    assertEquals(0, multiset.size());
    assertEquals(0, multiset.toArray().length);
    assertTrue(multiset.entrySet().isEmpty());
    assertFalse(multiset.iterator().hasNext());
    assertEquals(0, multiset.entrySet().size());
    assertEquals(0, multiset.entrySet().toArray().length);
    assertFalse(multiset.entrySet().iterator().hasNext());
  } 
 
  @SuppressWarnings("unchecked") 
  public void testEmptyRangeSubMultisetSupportingAdd(SortedMultiset<E> multiset) {
    for (Entry<E> entry : Arrays.asList(a, b, c)) {
      expectAddFailure(multiset, entry);
    }