Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 23 for getValueForNullKey (0.14 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/testers/MapGetTester.java

      }
    
      @MapFeature.Require(ALLOWS_NULL_KEYS)
      @CollectionSize.Require(absent = ZERO)
      public void testGet_nullContained() {
        initMapWithNullKey();
        assertEquals("get(null) should return the associated value", getValueForNullKey(), get(null));
      }
    
      public void testGet_wrongType() {
        try {
          assertNull("get(wrongType) should return null or throw", getMap().get(WrongType.VALUE));
        } catch (ClassCastException tolerated) {
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 20:12:35 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/testers/MapGetOrDefaultTester.java

      @CollectionSize.Require(absent = ZERO)
      public void testGetOrDefault_presentNull() {
        initMapWithNullKey();
        assertEquals(
            "getOrDefault(null, default) should return the associated value",
            getValueForNullKey(),
            getMap().getOrDefault(null, v3()));
      }
    
      @MapFeature.Require(ALLOWS_NULL_VALUES)
      @CollectionSize.Require(absent = ZERO)
      public void testGetOrDefault_presentMappedToNull() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/AbstractMapTester.java

        int nullKeyLocation = getNullLocation();
        Entry<K, V> oldEntry = array[nullKeyLocation];
        array[nullKeyLocation] = entry(null, oldEntry.getValue());
        return array;
      }
    
      protected V getValueForNullKey() {
        return getEntryNullReplaces().getValue();
      }
    
      protected K getKeyForNullValue() {
        return getEntryNullReplaces().getKey();
      }
    
      private Entry<K, V> getEntryNullReplaces() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/testers/MapComputeIfPresentTester.java

            v3(),
            getMap()
                .computeIfPresent(
                    null,
                    (k, v) -> {
                      assertNull(k);
                      assertEquals(getValueForNullKey(), v);
                      return v3();
                    }));
    
        Entry<K, V>[] expected = createArrayWithNullKey();
        expected[getNullLocation()] = entry(null, v3());
        expectContents(expected);
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:51:04 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/testers/MapEntrySetTester.java

      @CollectionSize.Require(absent = ZERO)
      @MapFeature.Require(ALLOWS_NULL_KEYS)
      public void testContainsEntryWithNullKeyPresent() {
        initMapWithNullKey();
        assertTrue(getMap().entrySet().contains(mapEntry(null, getValueForNullKey())));
      }
    
      @MapFeature.Require(ALLOWS_NULL_VALUE_QUERIES)
      public void testContainsEntryWithNullValueAbsent() {
        assertFalse(getMap().entrySet().contains(mapEntry(k0(), null)));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/testers/MapEntrySetTester.java

      @CollectionSize.Require(absent = ZERO)
      @MapFeature.Require(ALLOWS_NULL_KEYS)
      public void testContainsEntryWithNullKeyPresent() {
        initMapWithNullKey();
        assertTrue(getMap().entrySet().contains(mapEntry(null, getValueForNullKey())));
      }
    
      @MapFeature.Require(ALLOWS_NULL_VALUE_QUERIES)
      public void testContainsEntryWithNullValueAbsent() {
        assertFalse(getMap().entrySet().contains(mapEntry(k0(), null)));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/google/MultimapEntriesTester.java

      @MapFeature.Require(ALLOWS_NULL_KEYS)
      public void testContainsEntryWithNullKeyPresent() {
        initMultimapWithNullKey();
        assertContains(multimap().entries(), mapEntry((K) null, getValueForNullKey()));
      }
    
      @MapFeature.Require(ALLOWS_NULL_KEY_QUERIES)
      public void testContainsEntryWithNullKeyAbsent() {
        assertFalse(multimap().entries().contains(mapEntry(null, v0())));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/google/AbstractMultimapTester.java

        Entry<K, V>[] array = createSamplesArray();
        int nullValueLocation = getNullLocation();
        array[nullValueLocation] = mapEntry(null, null);
        return array;
      }
    
      protected V getValueForNullKey() {
        return getEntryNullReplaces().getValue();
      }
    
      protected K getKeyForNullValue() {
        return getEntryNullReplaces().getKey();
      }
    
      private Entry<K, V> getEntryNullReplaces() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapGetTester.java

      }
    
      @MapFeature.Require(ALLOWS_NULL_KEYS)
      @CollectionSize.Require(absent = ZERO)
      public void testGetNullPresent() {
        initMultimapWithNullKey();
        assertContains(multimap().get(null), getValueForNullKey());
      }
    
      @MapFeature.Require(ALLOWS_NULL_KEY_QUERIES)
      public void testGetNullAbsent() {
        assertEmpty(multimap().get(null));
      }
    
      @MapFeature.Require(absent = ALLOWS_NULL_KEY_QUERIES)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/google/MultimapAsMapTester.java

      @CollectionSize.Require(absent = ZERO)
      @MapFeature.Require(ALLOWS_NULL_KEYS)
      public void testAsMapGetNullKeyPresent() {
        initMultimapWithNullKey();
        assertContentsAnyOrder(multimap().asMap().get(null), getValueForNullKey());
      }
    
      @MapFeature.Require(ALLOWS_NULL_KEY_QUERIES)
      public void testAsMapGetNullKeyAbsent() {
        assertNull(multimap().asMap().get(null));
      }
    
      @MapFeature.Require(absent = ALLOWS_NULL_KEY_QUERIES)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.7K bytes
    - Viewed (0)
Back to top