Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 162 for Multisets (0.08 sec)

  1. android/guava-tests/test/com/google/common/collect/HashMultisetTest.java

        Multiset<String> multiset = HashMultiset.create(50);
        multiset.add("foo", 2);
        multiset.add("bar");
        assertEquals(3, multiset.size());
        assertEquals(2, multiset.count("foo"));
      }
    
      public void testCreateFromIterable() {
        Multiset<String> multiset = HashMultiset.create(asList("foo", "bar", "foo"));
        assertEquals(3, multiset.size());
        assertEquals(2, multiset.count("foo"));
      }
    
      @J2ktIncompatible
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/HashMultisetTest.java

        Multiset<String> multiset = HashMultiset.create(50);
        multiset.add("foo", 2);
        multiset.add("bar");
        assertEquals(3, multiset.size());
        assertEquals(2, multiset.count("foo"));
      }
    
      public void testCreateFromIterable() {
        Multiset<String> multiset = HashMultiset.create(asList("foo", "bar", "foo"));
        assertEquals(3, multiset.size());
        assertEquals(2, multiset.count("foo"));
      }
    
      @J2ktIncompatible
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java

        multiset.add(s1);
        multiset.add(s2, 3);
        assertEquals(2, multiset.count(s1));
        assertEquals(3, multiset.count(s2));
    
        multiset.remove(s1);
        assertEquals(1, multiset.count(s1));
        assertEquals(3, multiset.count(s2));
      }
    
      public void testLogicalKeyEquality_strongKeys() {
        testLogicalKeyEquality(STRONG);
      }
    
      public void testLogicalKeyEquality_weakKeys() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 14.2K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/LinkedHashMultisetTest.java

        };
      }
    
      public void testCreate() {
        Multiset<String> multiset = LinkedHashMultiset.create();
        multiset.add("foo", 2);
        multiset.add("bar");
        assertEquals(3, multiset.size());
        assertEquals(2, multiset.count("foo"));
        assertEquals("[foo x 2, bar]", multiset.toString());
      }
    
      public void testCreateWithSize() {
        Multiset<String> multiset = LinkedHashMultiset.create(50);
        multiset.add("foo", 2);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java

       *
       * @param multiset the presumed-immutable multiset
       * @param sampleElement an element of the same type as that contained by {@code multiset}. {@code
       *     multiset} may or may not have {@code sampleElement} as a member.
       */
      public static <E extends @Nullable Object> void assertMultisetIsUnmodifiable(
          Multiset<E> multiset, E sampleElement) {
        Multiset<E> copy = LinkedHashMultiset.create(multiset);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/TreeMultisetTest.java

        multiset.add("foo", 2);
        multiset.add("bar");
        assertEquals(3, multiset.size());
        assertEquals(2, multiset.count("foo"));
        assertEquals("[foo x 2, bar]", multiset.toString());
      }
    
      public void testCreateFromIterable() {
        Multiset<String> multiset = TreeMultiset.create(asList("foo", "bar", "foo"));
        assertEquals(3, multiset.size());
        assertEquals(2, multiset.count("foo"));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/ForwardingMultisetTest.java

            .testForwarding(
                Multiset.class,
                new Function<Multiset, Multiset>() {
                  @Override
                  public Multiset apply(Multiset delegate) {
                    return wrap(delegate);
                  }
                });
      }
    
      public void testEquals() {
        Multiset<String> set1 = ImmutableMultiset.of("one");
        Multiset<String> set2 = ImmutableMultiset.of("two");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java

       *
       * @param multiset the presumed-immutable multiset
       * @param sampleElement an element of the same type as that contained by {@code multiset}. {@code
       *     multiset} may or may not have {@code sampleElement} as a member.
       */
      public static <E extends @Nullable Object> void assertMultisetIsUnmodifiable(
          Multiset<E> multiset, E sampleElement) {
        Multiset<E> copy = LinkedHashMultiset.create(multiset);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/ConcurrentHashMultisetBasherTest.java

      private static class MutateTask implements Callable<int[]> {
        private final ConcurrentHashMultiset<String> multiset;
        private final ImmutableList<String> keys;
        private final Random random = new Random();
    
        private MutateTask(ConcurrentHashMultiset<String> multiset, ImmutableList<String> keys) {
          this.multiset = multiset;
          this.keys = keys;
        }
    
        @Override
        public int[] call() throws Exception {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/RegularImmutableMultiset.java

        // "extends Object" works around https://github.com/typetools/checker-framework/issues/3013
        SerializedForm(Multiset<? extends Object> multiset) {
          int distinct = multiset.entrySet().size();
          elements = new Object[distinct];
          counts = new int[distinct];
          int i = 0;
          for (Entry<? extends Object> entry : multiset.entrySet()) {
            elements[i] = entry.getElement();
            counts[i] = entry.getCount();
            i++;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 4.1K bytes
    - Viewed (0)
Back to top