Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 46 for ImmutableMultiset (0.1 seconds)

  1. android/guava/src/com/google/common/collect/ImmutableMultiset.java

       */
      public static <E> ImmutableMultiset<E> copyOf(Iterable<? extends E> elements) {
        if (elements instanceof ImmutableMultiset) {
          @SuppressWarnings("unchecked") // all supported methods are covariant
          ImmutableMultiset<E> result = (ImmutableMultiset<E>) elements;
          if (!result.isPartialView()) {
            return result;
          }
        }
        ImmutableMultiset.Builder<E> builder =
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Sep 22 21:07:18 GMT 2025
    - 22.3K bytes
    - Click Count (0)
  2. guava/src/com/google/common/collect/ImmutableMultiset.java

       *
       * @throws NullPointerException if any of {@code elements} is null
       */
      public static <E> ImmutableMultiset<E> copyOf(Iterable<? extends E> elements) {
        if (elements instanceof ImmutableMultiset) {
          @SuppressWarnings("unchecked") // all supported methods are covariant
          ImmutableMultiset<E> result = (ImmutableMultiset<E>) elements;
          if (!result.isPartialView()) {
            return result;
          }
        }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Sep 22 21:07:18 GMT 2025
    - 20.6K bytes
    - Click Count (0)
  3. guava/src/com/google/common/collect/RegularImmutableMultiset.java

    import org.jspecify.annotations.Nullable;
    
    /**
     * Implementation of {@link ImmutableMultiset} with zero or more elements.
     *
     * @author Jared Levy
     * @author Louis Wasserman
     */
    @GwtCompatible
    @SuppressWarnings("serial") // uses writeReplace(), not default serialization
    final class RegularImmutableMultiset<E> extends ImmutableMultiset<E> {
      private static final ImmutableEntry<?>[] EMPTY_ARRAY = new ImmutableEntry<?>[0];
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Dec 26 20:08:09 GMT 2025
    - 6.8K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java

        assertThat(ImmutableMultiset.copyOf(c)).isSameInstanceAs(c);
      }
    
      public void testCopyOf_shortcut_immutableMultiset() {
        Collection<String> c = ImmutableMultiset.of("a", "b", "c");
        assertThat(ImmutableMultiset.copyOf(c)).isSameInstanceAs(c);
      }
    
      public void testBuilderAdd() {
        ImmutableMultiset<String> multiset =
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 24.9K bytes
    - Click Count (0)
  5. guava-tests/test/com/google/common/collect/ImmutableMultisetFloodingTest.java

      }
    
      /** All the ways to create an ImmutableMultiset. */
      enum ConstructionPathway implements Construction<Multiset<Object>> {
        COPY_OF_COLLECTION {
          @Override
          public ImmutableMultiset<Object> create(List<?> keys) {
            return ImmutableMultiset.copyOf(keys);
          }
        },
        COPY_OF_ITERATOR {
          @Override
          public ImmutableMultiset<Object> create(List<?> keys) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 2.5K bytes
    - Click Count (0)
  6. android/guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java

        assertThat(ImmutableMultiset.copyOf(c)).isSameInstanceAs(c);
      }
    
      public void testCopyOf_shortcut_immutableMultiset() {
        Collection<String> c = ImmutableMultiset.of("a", "b", "c");
        assertThat(ImmutableMultiset.copyOf(c)).isSameInstanceAs(c);
      }
    
      public void testBuilderAdd() {
        ImmutableMultiset<String> multiset =
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 20.8K bytes
    - Click Count (0)
  7. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/RegularImmutableMultiset.java

    final class RegularImmutableMultiset<E> extends ImmutableMultiset<E> {
      static final ImmutableMultiset<Object> EMPTY =
          JdkBackedImmutableMultiset.create(ImmutableList.of());
    
      RegularImmutableMultiset() {}
    
      static <E> ImmutableMultiset<E> create(Collection<? extends Entry<? extends E>> entries) {
        if (entries.isEmpty()) {
          return ImmutableMultiset.of();
        } else {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Aug 06 14:59:07 GMT 2025
    - 1.6K bytes
    - Click Count (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

          }
        };
      }
    
      private static <T> ImmutableMultiset<T> multiset(T value, int count) {
        return multiset(ImmutableMap.of(value, count));
      }
    
      private static <T> ImmutableMultiset<T> multiset(T value1, int count1, T value2, int count2) {
        return multiset(ImmutableMap.of(value1, count1, value2, count2));
      }
    
      private static <T> ImmutableMultiset<T> multiset(Map<T, Integer> counts) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 8.4K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

          }
        };
      }
    
      private static <T> ImmutableMultiset<T> multiset(T value, int count) {
        return multiset(ImmutableMap.of(value, count));
      }
    
      private static <T> ImmutableMultiset<T> multiset(T value1, int count1, T value2, int count2) {
        return multiset(ImmutableMap.of(value1, count1, value2, count2));
      }
    
      private static <T> ImmutableMultiset<T> multiset(Map<T, Integer> counts) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 8.4K bytes
    - Click Count (0)
  10. guava/src/com/google/common/collect/JdkBackedImmutableMultiset.java

    import java.util.Map;
    import org.jspecify.annotations.Nullable;
    
    /**
     * An implementation of ImmutableMultiset backed by a JDK Map and a list of entries. Used to protect
     * against hash flooding attacks.
     *
     * @author Louis Wasserman
     */
    @GwtCompatible
    final class JdkBackedImmutableMultiset<E> extends ImmutableMultiset<E> {
      private final Map<E, Integer> delegateMap;
      private final ImmutableList<Entry<E>> entries;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Sep 23 17:50:58 GMT 2025
    - 3.2K bytes
    - Click Count (0)
Back to Top