Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for forEachEntry (0.19 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)
  3. guava/src/com/google/common/collect/Multisets.java

      private static <E extends @Nullable Object> boolean addAllImpl(
          Multiset<E> self, Multiset<? extends E> elements) {
        if (elements.isEmpty()) {
          return false;
        }
        elements.forEachEntry(self::add);
        return true;
      }
    
      /** An implementation of {@link Multiset#removeAll}. */
      static boolean removeAllImpl(Multiset<?> self, Collection<?> elementsToRemove) {
        Collection<?> collection =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/Multiset.java

       * efficient than iterating over the {@link #entrySet()} either explicitly or with {@code
       * entrySet().forEach(action)}.
       *
       * @since 21.0
       */
      default void forEachEntry(ObjIntConsumer<? super E> action) {
        checkNotNull(action);
        entrySet().forEach(entry -> action.accept(entry.getElement(), entry.getCount()));
      }
    
      // Comparison and hashing
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Jun 17 14:40:53 UTC 2023
    - 21K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/TreeMultiset.java

            setCount(prevEntry.getElement(), 0);
            prevEntry = null;
          }
        };
      }
    
      @Override
      public void forEachEntry(ObjIntConsumer<? super E> action) {
        checkNotNull(action);
        for (AvlNode<E> node = firstNode();
            node != header && node != null && !range.tooHigh(node.getElement());
            node = node.succ()) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 34.5K bytes
    - Viewed (0)
Back to top