Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 84 for immutableEntry (0.12 sec)

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

            new Builder<String, Integer>().put(immutableEntry("one", 1)).build();
        assertEquals(asList(1), multimap.get("one"));
      }
    
      public void testBuilder_withImmutableEntryAndNullContents() {
        Builder<String, Integer> builder = new Builder<>();
        assertThrows(
            NullPointerException.class, () -> builder.put(immutableEntry("one", (Integer) null)));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/ImmutableSetMultimapTest.java

        assertThat(builder.build().entries()).containsExactly(Maps.immutableEntry("key", "value"));
      }
    
      public void testBuilderWithExpectedKeysPositive() {
        ImmutableSetMultimap.Builder<String, String> builder =
            ImmutableSetMultimap.builderWithExpectedKeys(1);
        builder.put("key", "value");
        assertThat(builder.build().entries()).containsExactly(Maps.immutableEntry("key", "value"));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 26.9K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/google/MultimapKeysTester.java

        assertEquals(1, keys.count(k1()));
        assertEquals(3, keys.size());
        assertContainsAllOf(keys, k0(), k1());
        assertContainsAllOf(
            keys.entrySet(), Multisets.immutableEntry(k0(), 2), Multisets.immutableEntry(k1(), 1));
      }
    
      @MapFeature.Require(ALLOWS_NULL_KEY_QUERIES)
      public void testKeysCountAbsentNullKey() {
        assertEquals(0, multimap().keys().count(null));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetTestSuiteBuilder.java

          SampleElements<E> samples = gen.samples();
          return new SampleElements<>(
              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) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetEntrySetTester.java

        assertTrue(
            "non-empty multiset.entrySet() iterator.hasNext() returned false", iterator.hasNext());
        assertEquals(
            "multiset.entrySet() iterator.next() returned incorrect entry",
            Multisets.immutableEntry(e0(), 1),
            iterator.next());
        assertFalse(
            "size 1 multiset.entrySet() iterator.hasNext() returned true after next()",
            iterator.hasNext());
        iterator.remove();
        assertTrue(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  6. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ForwardingSortedMultiset.java

        Iterator<Entry<E>> entryIterator = entrySet().iterator();
        if (!entryIterator.hasNext()) {
          return null;
        }
        Entry<E> entry = entryIterator.next();
        return Multisets.immutableEntry(entry.getElement(), entry.getCount());
      }
    
      @Override
      @CheckForNull
      public Entry<E> lastEntry() {
        return delegate().lastEntry();
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jan 23 18:43:40 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java

    /**
     * Tests for {@link Multisets#immutableEntry}.
     *
     * @author Mike Bostock
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public class MultisetsImmutableEntryTest extends TestCase {
      private static final @Nullable String NE = null;
    
      private static <E extends @Nullable Object> Entry<E> entry(final E element, final int count) {
        return Multisets.immutableEntry(element, count);
      }
    
    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/JdkBackedImmutableMultiset.java

          int count = entry.getCount();
          size += count;
          E element = checkNotNull(entry.getElement());
          delegateMap.put(element, count);
          if (!(entry instanceof Multisets.ImmutableEntry)) {
            entriesArray[i] = Multisets.immutableEntry(element, count);
          }
        }
        return new JdkBackedImmutableMultiset<>(
            delegateMap, ImmutableList.asImmutableList(entriesArray), size);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/TreeMultimapNaturalTest.java

        assertThat(multimap.entries())
            .containsExactly(
                immutableEntry("foo", 1),
                immutableEntry("foo", 3),
                immutableEntry("foo", 7),
                immutableEntry("google", 2),
                immutableEntry("google", 6),
                immutableEntry("tree", 0),
                immutableEntry("tree", 4))
            .inOrder();
      }
    
      public void testOrderedValues() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/MultimapsCollectionTest.java

        @Override
        public SampleElements<Entry<String, Integer>> samples() {
          return new SampleElements<>(
              immutableEntry("bar", 1),
              immutableEntry("bar", 2),
              immutableEntry("foo", 3),
              immutableEntry("bar", 3),
              immutableEntry("cat", 2));
        }
    
        @Override
        public Collection<Entry<String, Integer>> create(Object... elements) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 28.9K bytes
    - Viewed (0)
Back to top