Home | History | Annotate | Download | only in collect

Lines Matching refs:multiset

39  * A multiset that supports concurrent modifications and that provides atomic
40 * versions of most {@code Multiset} operations (exceptions where noted). Null
82 * @param elements the elements that the multiset should contain
86 ConcurrentHashMultiset<E> multiset = ConcurrentHashMultiset.create();
87 Iterables.addAll(multiset, elements);
88 return multiset;
98 * @param countMap backing map for storing the elements in the multiset and
111 * Returns the number of occurrences of {@code element} in this multiset.
129 * <p>If the data in the multiset is modified by any other threads during this
160 for (Multiset.Entry<E> entry : entrySet()) {
172 * Adds a number of occurrences of the specified element to this multiset.
208 * multiset. If the multiset contains fewer than this number of occurrences to
245 * Removes <b>all</b> occurrences of the specified element from this multiset.
246 * This method complements {@link Multiset#remove(Object)}, which removes only
304 * @return the count of {@code element} in the multiset before this call
317 * not appear in the multiset exactly {@code oldCount} times, no changes will
321 * that the multiset has been modified, but not always: in the case that
366 @Override public Set<Multiset.Entry<E>> entrySet() {
374 private class EntrySet extends AbstractSet<Multiset.Entry<E>> {
384 if (object instanceof Multiset.Entry) {
385 Multiset.Entry<?> entry = (Multiset.Entry<?>) object;
393 @Override public Iterator<Multiset.Entry<E>> iterator() {
396 return new Iterator<Multiset.Entry<E>>() {
401 public Multiset.Entry<E> next() {
430 private List<Multiset.Entry<E>> snapshot() {
431 List<Multiset.Entry<E>> list = Lists.newArrayListWithExpectedSize(size());
432 for (Multiset.Entry<E> entry : this) {
439 if (object instanceof Multiset.Entry) {
440 Multiset.Entry<?> entry = (Multiset.Entry<?>) object;