Code example for SortedMultiset

Methods: headMultiset

0
      } 
 
      @Override 
      <E> SortedMultiset<E> subMultiset(SortedMultiset<E> multiset, List<Entry<E>> entries,
          int targetEntry) {
        return multiset.headMultiset(entries.get(targetEntry).getElement(), OPEN); 
      } 
    }; 
    abstract <E> List<Entry<E>> expectedEntries(int targetEntry, List<Entry<E>> entries);
 
    abstract <E> SortedMultiset<E> subMultiset(SortedMultiset<E> multiset, List<Entry<E>> entries,
        int targetEntry);
  } 
 
  private void testSubMultisetEntrySet(SubMultisetSpec spec) {
    List<Entry<E>> entries = copyToList(sortedMultiset.entrySet());
    for (int i = 0; i < entries.size(); i++) {
      List<Entry<E>> expected = spec.expectedEntries(i, entries);
      SortedMultiset<E> subMultiset = spec.subMultiset(sortedMultiset, entries, i);
      assertEquals(expected, copyToList(subMultiset.entrySet()));
Connect your IDE to all the code out there  Get Codota for Java