Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 167 for multiset (0.06 sec)

  1. 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)
  2. 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)
  3. 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)
  4. guava/src/com/google/common/collect/ForwardingMultiset.java

       */
      protected class StandardElementSet extends Multisets.ElementSet<E> {
        /** Constructor for use by subclasses. */
        public StandardElementSet() {}
    
        @Override
        Multiset<E> multiset() {
          return ForwardingMultiset.this;
        }
    
        @Override
        public Iterator<E> iterator() {
          return Multisets.elementIterator(multiset().entrySet().iterator());
        }
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 15:26:39 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/FilteredEntryMultimap.java

            }
          }
          return oldCount;
        }
    
        @Override
        public Set<Multiset.Entry<K>> entrySet() {
          return new Multisets.EntrySet<K>() {
    
            @Override
            Multiset<K> multiset() {
              return Keys.this;
            }
    
            @Override
            public Iterator<Multiset.Entry<K>> iterator() {
              return Keys.this.entryIterator();
            }
    
            @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  6. 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)
  7. android/guava-tests/test/com/google/common/collect/CollectSpliteratorsTest.java

      }
    
      public void testMultisetsSpliterator() {
        Multiset<String> multiset = TreeMultiset.create();
        multiset.add("a", 3);
        multiset.add("b", 1);
        multiset.add("c", 2);
    
        List<String> actualValues = Lists.newArrayList();
        multiset.spliterator().forEachRemaining(actualValues::add);
        assertThat(multiset).containsExactly("a", "a", "a", "b", "c", "c").inOrder();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/google/MultisetFeature.java

    @GwtCompatible
    public enum MultisetFeature implements Feature<Multiset> {
      /**
       * Indicates that elements from {@code Multiset.entrySet()} update to reflect changes in the
       * backing multiset.
       */
      ENTRIES_ARE_VIEWS;
    
      @Override
      public Set<Feature<? super Multiset>> getImpliedFeatures() {
        return emptySet();
      }
    
      @Retention(RetentionPolicy.RUNTIME)
      @Inherited
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  9. 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)
  10. android/guava/src/com/google/common/collect/CollectCollectors.java

            (multiset1, multiset2) -> {
              multiset1.addAll(multiset2);
              return multiset1;
            },
            (Multiset<E> multiset) -> ImmutableMultiset.copyFromEntries(multiset.entrySet()));
      }
    
      static <T extends @Nullable Object, E extends @Nullable Object, M extends Multiset<E>>
          Collector<T, ?, M> toMultiset(
              Function<? super T, E> elementFunction,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 17.1K bytes
    - Viewed (0)
Back to top