Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for foreachEntry (0.08 sec)

  1. guava/src/com/google/common/collect/AbstractMapBasedMultiset.java

            size -= toRemove.getValue().getAndSet(0);
            backingEntries.remove();
            toRemove = null;
          }
        };
      }
    
      @Override
      public void forEachEntry(ObjIntConsumer<? super E> action) {
        checkNotNull(action);
        backingMap.forEach((element, count) -> action.accept(element, count.get()));
      }
    
      @Override
      public void clear() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/ImmutableSortedMultisetTest.java

        ImmutableSortedMultiset<String> multiset =
            ImmutableSortedMultiset.<String>naturalOrder().add("a").add("b").add("a").add("c").build();
        List<Multiset.Entry<String>> entries = new ArrayList<>();
        multiset.forEachEntry((e, c) -> entries.add(Multisets.immutableEntry(e, c)));
        assertThat(entries)
            .containsExactly(
                Multisets.immutableEntry("a", 2),
                Multisets.immutableEntry("b", 1),
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.7K bytes
    - Viewed (0)
Back to top