Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 40 for ImmutableMultiset (0.2 sec)

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

    import java.util.Map;
    import javax.annotation.CheckForNull;
    
    /**
     * 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
    @ElementTypesAreNonnullByDefault
    final class JdkBackedImmutableMultiset<E> extends ImmutableMultiset<E> {
      private final Map<E, Integer> delegateMap;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/SimpleAbstractMultisetTest.java

              public int add(String element, int occurrences) {
                addCalls.incrementAndGet();
                return super.add(element, occurrences);
              }
            };
        ImmutableMultiset<String> adds =
            new ImmutableMultiset.Builder<String>().addCopies("x", 10).build();
        multiset.addAll(adds);
        assertEquals(1, addCalls.get());
      }
    
      public void testRemoveUnsupported() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/SimpleAbstractMultisetTest.java

              public int add(String element, int occurrences) {
                addCalls.incrementAndGet();
                return super.add(element, occurrences);
              }
            };
        ImmutableMultiset<String> adds =
            new ImmutableMultiset.Builder<String>().addCopies("x", 10).build();
        multiset.addAll(adds);
        assertEquals(1, addCalls.get());
      }
    
      public void testRemoveUnsupported() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Multisets.java

       * {@code stream.map(function).collect(Collectors.toCollection(supplier))}.
       *
       * <p>To collect to an {@link ImmutableMultiset}, use {@link
       * ImmutableMultiset#toImmutableMultiset}.
       *
       * @since 33.2.0 (available since 22.0 in guava-jre)
       */
      @SuppressWarnings("Java7ApiChecker")
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

              .put(
                  SortedSetMultimap.class,
                  Multimaps.unmodifiableSortedSetMultimap(TreeMultimap.create()))
              .put(Multiset.class, ImmutableMultiset.of())
              .put(ImmutableMultiset.class, ImmutableMultiset.of())
              .put(SortedMultiset.class, ImmutableSortedMultiset.of())
              .put(ImmutableSortedMultiset.class, ImmutableSortedMultiset.of())
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/Multisets.java

       * {@code stream.map(function).collect(Collectors.toCollection(supplier))}.
       *
       * <p>To collect to an {@link ImmutableMultiset}, use {@link
       * ImmutableMultiset#toImmutableMultiset}.
       *
       * @since 22.0
       */
      public static <T extends @Nullable Object, E extends @Nullable Object, M extends Multiset<E>>
          Collector<T, ?, M> toMultiset(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/MultisetsCollectionTest.java

              multiset2.add(elements[i], i + 1);
            }
            return difference(multiset1, multiset2);
          }
        };
      }
    
      private static final ImmutableMultiset<String> ELEMENTS_TO_FILTER_OUT =
          ImmutableMultiset.of("foobar", "bazfoo", "foobar", "foobar");
    
      private static final Predicate<String> PREDICATE = not(Predicates.in(ELEMENTS_TO_FILTER_OUT));
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/MultisetsCollectionTest.java

              multiset2.add(elements[i], i + 1);
            }
            return difference(multiset1, multiset2);
          }
        };
      }
    
      private static final ImmutableMultiset<String> ELEMENTS_TO_FILTER_OUT =
          ImmutableMultiset.of("foobar", "bazfoo", "foobar", "foobar");
    
      private static final Predicate<String> PREDICATE = not(Predicates.in(ELEMENTS_TO_FILTER_OUT));
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java

    @GwtIncompatible // hasn't been tested yet
    @ElementTypesAreNonnullByDefault
    public abstract class ImmutableSortedMultiset<E> extends ImmutableMultiset<E>
        implements SortedMultiset<E> {
      // TODO(lowasser): GWT compatibility
    
      /**
       * Returns a {@code Collector} that accumulates the input elements into a new {@code
       * ImmutableMultiset}. Elements are sorted by the specified comparator.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  10. android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

        assertEquals(ImmutableSortedMap.of(), ArbitraryInstances.get(ImmutableSortedMap.class));
        assertEquals(ImmutableMultiset.of(), ArbitraryInstances.get(Multiset.class));
        assertEquals(ImmutableMultiset.of(), ArbitraryInstances.get(ImmutableMultiset.class));
        assertTrue(ArbitraryInstances.get(SortedMultiset.class).isEmpty());
        assertEquals(ImmutableMultimap.of(), ArbitraryInstances.get(Multimap.class));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 21.8K bytes
    - Viewed (0)
Back to top