Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 162 for Multisets (0.1 sec)

  1. 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)
  2. 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)
  3. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetSerializationTester.java

    import com.google.common.annotations.GwtCompatible;
    import com.google.common.collect.Multiset;
    import com.google.common.collect.testing.features.CollectionFeature;
    import com.google.common.testing.SerializableTester;
    import java.util.Set;
    import org.junit.Ignore;
    
    /**
     * A generic JUnit test which tests multiset-specific serialization. Can't be invoked directly;
     * please see {@link MultisetTestSuiteBuilder}.
     *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/graph/UndirectedMultiNetworkConnections.java

      }
    
      @CheckForNull @LazyInit private transient Reference<Multiset<N>> adjacentNodesReference;
    
      @Override
      public Set<N> adjacentNodes() {
        return Collections.unmodifiableSet(adjacentNodesMultiset().elementSet());
      }
    
      private Multiset<N> adjacentNodesMultiset() {
        Multiset<N> adjacentNodes = getReference(adjacentNodesReference);
        if (adjacentNodes == null) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 06 00:47:57 UTC 2021
    - 3.7K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/EnumMultisetTest.java

        FEMALE
      }
    
      public void testClassCreate() {
        Multiset<Color> ms = EnumMultiset.create(Color.class);
        ms.add(Color.RED);
        ms.add(Color.YELLOW);
        ms.add(Color.RED);
        assertEquals(0, ms.count(Color.BLUE));
        assertEquals(1, ms.count(Color.YELLOW));
        assertEquals(2, ms.count(Color.RED));
      }
    
      public void testCollectionCreate() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/google/SortedMultisetTestSuiteBuilder.java

                      multiset = multiset.tailMultiset(firstExclusive, BoundType.OPEN);
                    }
    
                    if (to == Bound.INCLUSIVE) {
                      multiset = multiset.headMultiset(lastInclusive, BoundType.CLOSED);
                    } else if (to == Bound.EXCLUSIVE) {
                      multiset = multiset.headMultiset(lastExclusive, BoundType.OPEN);
                    }
    
                    return multiset;
                  }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetTester.java

     */
    
    package com.google.common.collect.testing.google;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.collect.Multiset;
    import com.google.common.collect.testing.AbstractCollectionTester;
    import org.junit.Ignore;
    
    /**
     * Base class for multiset collection tests.
     *
     * @author Jared Levy
     */
    @GwtCompatible
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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) {
        ImmutableMultiset.Builder<T> builder = ImmutableMultiset.builder();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 8.2K bytes
    - Viewed (0)
Back to top