Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 162 for Multisets (0.31 sec)

  1. guava-tests/benchmark/com/google/common/collect/HashMultisetAddPresentBenchmark.java

      private static final int ARRAY_SIZE = 0x10000;
      List<Multiset<Integer>> multisets = new ArrayList<>(0x10000);
      int[] queries = new int[ARRAY_SIZE];
    
      @BeforeExperiment
      void setUp() {
        Random random = new Random();
        multisets.clear();
        for (int i = 0; i < ARRAY_SIZE; i++) {
          HashMultiset<Integer> multiset = HashMultiset.<Integer>create();
          multisets.add(multiset);
          queries[i] = random.nextInt();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 1.6K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/google/MultisetTestSuiteBuilder.java

              Multisets.immutableEntry(samples.e0(), 3),
              Multisets.immutableEntry(samples.e1(), 4),
              Multisets.immutableEntry(samples.e2(), 1),
              Multisets.immutableEntry(samples.e3(), 5),
              Multisets.immutableEntry(samples.e4(), 2));
        }
    
        @Override
        public Set<Multiset.Entry<E>> create(Object... entries) {
          List<Object> contents = new ArrayList<>();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  3. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/DescendingMultiset.java

        Set<Entry<E>> result = entrySet;
        return (result == null) ? entrySet = createEntrySet() : result;
      }
    
      Set<Entry<E>> createEntrySet() {
        return new Multisets.EntrySet<E>() {
          @Override
          Multiset<E> multiset() {
            return DescendingMultiset.this;
          }
    
          @Override
          public Iterator<Entry<E>> iterator() {
            return entryIterator();
          }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jan 24 16:03:45 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/google/MultisetElementSetTester.java

        getMultiset().elementSet().clear();
        assertEmpty(getMultiset());
      }
    
      /**
       * Returns {@link Method} instances for the read tests that assume multisets support duplicates so
       * that the test of {@code Multisets.forSet()} can suppress them.
       */
      @J2ktIncompatible
      @GwtIncompatible // reflection
      public static List<Method> getElementSetDuplicateInitializingMethods() {
        return asList(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/SimpleAbstractMultisetTest.java

            new ImmutableMultiset.Builder<String>().addCopies("x", 10).build();
        multiset.addAll(adds);
        assertEquals(1, addCalls.get());
      }
    
      public void testRemoveUnsupported() {
        Multiset<String> multiset = new NoRemoveMultiset<>();
        multiset.add("a");
        assertThrows(UnsupportedOperationException.class, () -> multiset.remove("a"));
        assertTrue(multiset.contains("a"));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/DescendingMultiset.java

        return (result == null) ? entrySet = createEntrySet() : result;
      }
    
      Set<Entry<E>> createEntrySet() {
        @WeakOuter
        class EntrySetImpl extends Multisets.EntrySet<E> {
          @Override
          Multiset<E> multiset() {
            return DescendingMultiset.this;
          }
    
          @Override
          public Iterator<Entry<E>> iterator() {
            return entryIterator();
          }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jun 26 21:02:13 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java

    import static java.util.Collections.nCopies;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.collect.Multiset.Entry;
    import junit.framework.TestCase;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Tests for {@link Multisets#immutableEntry}.
     *
     * @author Mike Bostock
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/DescendingMultiset.java

        return (result == null) ? entrySet = createEntrySet() : result;
      }
    
      Set<Entry<E>> createEntrySet() {
        @WeakOuter
        class EntrySetImpl extends Multisets.EntrySet<E> {
          @Override
          Multiset<E> multiset() {
            return DescendingMultiset.this;
          }
    
          @Override
          public Iterator<Entry<E>> iterator() {
            return entryIterator();
          }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jun 26 21:02:13 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/SortedMultisets.java

      static class ElementSet<E extends @Nullable Object> extends Multisets.ElementSet<E>
          implements SortedSet<E> {
        @Weak private final SortedMultiset<E> multiset;
    
        ElementSet(SortedMultiset<E> multiset) {
          this.multiset = multiset;
        }
    
        @Override
        final SortedMultiset<E> multiset() {
          return multiset;
        }
    
        @Override
        public Iterator<E> iterator() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 01 17:18:04 UTC 2021
    - 5.6K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetReadsTester.java

      public void testEquals_yes() {
        assertTrue(
            "multiset doesn't equal a multiset with the same elements",
            getMultiset().equals(HashMultiset.create(getSampleElements())));
      }
    
      public void testEquals_differentSize() {
        Multiset<E> other = HashMultiset.create(getSampleElements());
        other.add(e0());
        assertFalse("multiset equals a multiset with a different size", getMultiset().equals(other));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top