Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for singletonMap (0.2 sec)

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

        try {
          builder.putAll(Collections.<String, Integer>singletonMap(null, 1));
          fail();
        } catch (NullPointerException expected) {
        }
      }
    
      public void testBuilderPutNullValueViaPutAll() {
        Builder<String, Integer> builder = ImmutableSortedMap.naturalOrder();
        try {
          builder.putAll(Collections.<String, Integer>singletonMap("one", null));
          fail();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/ImmutableClassToInstanceMapTest.java

      }
    
      public void testCopyOf_map_nulls() {
        Map<Class<? extends Number>, Number> nullKey = Collections.singletonMap(null, (Number) 1.0);
        assertThrows(NullPointerException.class, () -> ImmutableClassToInstanceMap.copyOf(nullKey));
    
        Map<? extends Class<? extends Number>, Number> nullValue =
            Collections.singletonMap(Number.class, null);
        assertThrows(NullPointerException.class, () -> ImmutableClassToInstanceMap.copyOf(nullValue));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 20:09:59 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  3. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/SingletonImmutableBiMap.java

      SingletonImmutableBiMap(K key, V value) {
        super(Collections.singletonMap(checkNotNull(key), checkNotNull(value)));
        this.singleKey = key;
        this.singleValue = value;
      }
    
      private SingletonImmutableBiMap(K key, V value, SingletonImmutableBiMap<V, K> inverse) {
        super(Collections.singletonMap(checkNotNull(key), checkNotNull(value)));
        this.singleKey = key;
        this.singleValue = value;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 23 18:43:40 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/MapInterfaceTest.java

        try {
          keyToPut = getKeyNotInPopulatedMap();
          valueToPut = getValueNotInPopulatedMap();
        } catch (UnsupportedOperationException e) {
          return;
        }
        Map<K, V> mapToPut = Collections.singletonMap(keyToPut, valueToPut);
        if (supportsPut) {
          int initialSize = map.size();
          map.putAll(mapToPut);
          assertEquals(valueToPut, map.get(keyToPut));
          assertTrue(map.containsKey(keyToPut));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 45.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/ImmutableBiMapTest.java

        try {
          builder.putAll(Collections.<String, Integer>singletonMap(null, 1));
          fail();
        } catch (NullPointerException expected) {
        }
      }
    
      public void testBuilderPutNullValueViaPutAll() {
        Builder<String, Integer> builder = new Builder<>();
        try {
          builder.putAll(Collections.<String, Integer>singletonMap("one", null));
          fail();
        } catch (NullPointerException expected) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 21.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/ImmutableClassToInstanceMapTest.java

      }
    
      public void testCopyOf_map_nulls() {
        Map<Class<? extends Number>, Number> nullKey = Collections.singletonMap(null, (Number) 1.0);
        assertThrows(NullPointerException.class, () -> ImmutableClassToInstanceMap.copyOf(nullKey));
    
        Map<? extends Class<? extends Number>, Number> nullValue =
            Collections.singletonMap(Number.class, null);
        assertThrows(NullPointerException.class, () -> ImmutableClassToInstanceMap.copyOf(nullValue));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 20:09:59 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/TestsForMapsInJavaUtil.java

                  @Override
                  protected Map<String, String> create(Entry<String, String>[] entries) {
                    return Collections.singletonMap(entries[0].getKey(), entries[0].getValue());
                  }
                })
            .named("singletonMap")
            .withFeatures(
                MapFeature.ALLOWS_NULL_KEYS,
                MapFeature.ALLOWS_NULL_VALUES,
                MapFeature.ALLOWS_ANY_NULL_QUERIES,
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 17K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/google/ListMultimapAsMapTester.java

        assertTrue(multimap().asMap().values().remove(Collections.singletonList(v0())));
        assertEquals(2, multimap().size());
        assertEquals(
            Collections.singletonMap(k0(), Lists.newArrayList(v0(), v3())), multimap().asMap());
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/ImmutableBiMapTest.java

        try {
          builder.putAll(Collections.<String, Integer>singletonMap(null, 1));
          fail();
        } catch (NullPointerException expected) {
        }
      }
    
      public void testBuilderPutNullValueViaPutAll() {
        Builder<String, Integer> builder = new Builder<>();
        try {
          builder.putAll(Collections.<String, Integer>singletonMap("one", null));
          fail();
        } catch (NullPointerException expected) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/google/SetMultimapAsMapTester.java

        assertTrue(multimap().asMap().values().remove(Collections.singleton(v0())));
        assertEquals(2, multimap().size());
        assertEquals(Collections.singletonMap(k0(), Sets.newHashSet(v0(), v3())), multimap().asMap());
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.9K bytes
    - Viewed (0)
Back to top