Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for immutableEntry (0.15 sec)

  1. guava/src/com/google/common/collect/ImmutableEntry.java

    /**
     * An immutable {@code Map.Entry}, used both by {@link
     * com.google.common.collect.Maps#immutableEntry(Object, Object)} and by other parts of {@code
     * common.collect} as a superclass.
     */
    @GwtCompatible(serializable = true)
    @ElementTypesAreNonnullByDefault
    class ImmutableEntry<K extends @Nullable Object, V extends @Nullable Object>
        extends AbstractMapEntry<K, V> implements Serializable {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 19 21:29:44 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  2. android/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)
  3. guava-tests/test/com/google/common/collect/HashBiMapTest.java

            .containsExactly(immutableEntry("foo", 1), immutableEntry("quux", 3))
            .inOrder();
      }
    
      public void testInsertionOrderAfterRemoveLast() {
        BiMap<String, Integer> map = HashBiMap.create();
        map.put("foo", 1);
        map.put("bar", 2);
        map.put("quux", 3);
    
        map.remove("quux");
        assertThat(map.entrySet())
            .containsExactly(immutableEntry("foo", 1), immutableEntry("bar", 2))
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/ImmutableRangeMapTest.java

                Entry<Range<Integer>, Integer> expectedEntry = null;
                if (range1.contains(i)) {
                  expectedEntry = immutableEntry(range1, 1);
                } else if (range2.contains(i)) {
                  expectedEntry = immutableEntry(range2, 2);
                }
    
                assertEquals(expectedEntry, rangeMap.getEntry(i));
              }
            }
          }
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  5. android/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)
  6. guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java

                Maps.<@Nullable String, Integer>immutableEntry(null, 7),
                Maps.<@Nullable String, Integer>immutableEntry(null, 3),
                Maps.<@Nullable String, Integer>immutableEntry(null, 1),
                Maps.<String, @Nullable Integer>immutableEntry("tree", null),
                immutableEntry("tree", 0),
                immutableEntry("google", 6),
                immutableEntry("google", 2))
            .inOrder();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/EnumHashBiMapTest.java

        @Override
        public SampleElements<Entry<Country, String>> samples() {
          return new SampleElements<>(
              immutableEntry(Country.CANADA, "DOLLAR"),
              immutableEntry(Country.CHILE, "PESO"),
              immutableEntry(Country.UK, "POUND"),
              immutableEntry(Country.JAPAN, "YEN"),
              immutableEntry(Country.SWITZERLAND, "FRANC"));
        }
    
        @SuppressWarnings("unchecked")
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  8. 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)
  9. guava-tests/test/com/google/common/collect/ImmutableBiMapFloodingTest.java

                            keys ->
                                path.create(transform(keys, key -> immutableEntry(key, new Object()))),
                            keys ->
                                path.create(transform(keys, key -> immutableEntry(new Object(), key))),
                            keys -> path.create(transform(keys, key -> immutableEntry(key, key)))))
                .collect(toImmutableList()),
            n -> n * log(n),
            ImmutableList.of(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/AbstractMapsTransformValuesTest.java

        assertTrue(entries.contains(immutableEntry("a", true)));
        assertTrue(entries.contains(Maps.<String, @Nullable Boolean>immutableEntry("b", null)));
        assertTrue(
            entries.contains(Maps.<@Nullable String, @Nullable Boolean>immutableEntry(null, null)));
    
        assertFalse(entries.contains(Maps.<String, @Nullable Boolean>immutableEntry("c", null)));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9.4K bytes
    - Viewed (0)
Back to top