A Multiset which maintains the ordering of its elements, according to either their natural order or an explicit Comparator. This order is reflected when iterating over the sorted multiset, either directly, or through its elementSet or entrySet views. In all cases, thi
| 42 | * @since 11.0 |
| 43 | */ |
| 44 | @GwtCompatible |
| 45 | public interface SortedMultiset<E extends @Nullable Object> |
| 46 | extends SortedMultisetBridge<E>, SortedIterable<E> { |
| 47 | /** |
| 48 | * Returns the comparator that orders this multiset, or {@link Ordering#natural()} if the natural |
| 49 | * ordering of the elements is used. |
| 50 | */ |
| 51 | @Override |
| 52 | Comparator<? super E> comparator(); |
| 53 | |
| 54 | /** |
| 55 | * Returns the entry of the first element in this multiset, or {@code null} if this multiset is |
| 56 | * empty. |
| 57 | */ |
| 58 | @Nullable Entry<E> firstEntry(); |
| 59 | |
| 60 | /** |
| 61 | * Returns the entry of the last element in this multiset, or {@code null} if this multiset is |
| 62 | * empty. |
| 63 | */ |
| 64 | @Nullable Entry<E> lastEntry(); |
| 65 | |
| 66 | /** |
| 67 | * Returns and removes the entry associated with the lowest element in this multiset, or returns |
| 68 | * {@code null} if this multiset is empty. |
| 69 | */ |
| 70 | @Nullable Entry<E> pollFirstEntry(); |
| 71 | |
| 72 | /** |
| 73 | * Returns and removes the entry associated with the greatest element in this multiset, or returns |
| 74 | * {@code null} if this multiset is empty. |
| 75 | */ |
| 76 | @Nullable Entry<E> pollLastEntry(); |
| 77 | |
| 78 | /** |
| 79 | * Returns a {@link NavigableSet} view of the distinct elements in this multiset. |
| 80 | * |
| 81 | * @since 14.0 (present with return type {@code SortedSet} since 11.0) |
| 82 | */ |
| 83 | @Override |
| 84 | NavigableSet<E> elementSet(); |
| 85 | |
| 86 | /** |
| 87 | * {@inheritDoc} |
| 88 | * |
| 89 | * <p>The {@code entrySet}'s iterator returns entries in ascending element order according to this |
| 90 | * multiset's comparator. |
| 91 | */ |
| 92 | @Override |
| 93 | Set<Entry<E>> entrySet(); |
| 94 | |
| 95 | /** |
| 96 | * {@inheritDoc} |
| 97 | * |
| 98 | * <p>The iterator returns the elements in ascending order according to this multiset's |
| 99 | * comparator. |
| 100 | */ |
| 101 | @Override |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…