- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 511 for Map (0.12 sec)
-
guava-tests/test/com/google/common/collect/ForwardingConcurrentMapTest.java
assertFalse(map.remove("bar", 1)); assertEquals(Integer.valueOf(1), map.get("foo")); assertTrue(map.remove("foo", 1)); assertTrue(map.isEmpty()); } public void testReplace() { TestMap map = new TestMap(); map.put("foo", 1); assertEquals(Integer.valueOf(1), map.replace("foo", 2)); assertNull(map.replace("bar", 3)); assertEquals(Integer.valueOf(2), map.get("foo")); assertFalse(map.containsKey("bar"));
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 2.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/AbstractImmutableBiMapMapInterfaceTest.java
assertEquals("[" + JOINER.join(map.keySet()) + "]", map.keySet().toString()); assertEquals("[" + JOINER.join(map.values()) + "]", map.values().toString()); assertEquals(Sets.newHashSet(map.entrySet()), map.entrySet()); assertEquals(Sets.newHashSet(map.keySet()), map.keySet()); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Mar 09 16:16:28 GMT 2022 - 1.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/AbstractImmutableMapMapInterfaceTest.java
@Override protected final void assertMoreInvariants(Map<K, V> map) { // TODO: can these be moved to MapInterfaceTest? for (Entry<K, V> entry : map.entrySet()) { assertEquals(entry.getKey() + "=" + entry.getValue(), entry.toString()); } assertEquals("{" + JOINER.join(map.entrySet()) + "}", map.toString()); assertEquals("[" + JOINER.join(map.entrySet()) + "]", map.entrySet().toString());
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Mar 09 02:18:08 GMT 2022 - 1.9K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/EnumBiMap.java
* Returns a new bimap with the same mappings as the specified map. If the specified map is an * {@code EnumBiMap}, the new bimap has the same types as the provided map. Otherwise, the * specified map must contain at least one mapping, in order to determine the key and value types. * * @param map the map whose mappings are to be placed in this map * @throws IllegalArgumentException if map is not an {@code EnumBiMap} instance and contains no
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Aug 24 01:40:03 GMT 2023 - 6.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/AbstractMultimapAsMapImplementsMapTest.java
try { map = makePopulatedMap(); } catch (UnsupportedOperationException e) { return; } keyToRemove = map.keySet().iterator().next(); if (supportsRemove) { int initialSize = map.size(); map.get(keyToRemove); map.remove(keyToRemove); // This line doesn't hold - see the Javadoc comments above. // assertEquals(expectedValue, oldValue); assertFalse(map.containsKey(keyToRemove));
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Feb 19 20:34:55 GMT 2024 - 3K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableMapValues.java
private final ImmutableMap<K, V> map; ImmutableMapValues(ImmutableMap<K, V> map) { this.map = map; } @Override public int size() { return map.size(); } @Override public UnmodifiableIterator<V> iterator() { return new UnmodifiableIterator<V>() { final UnmodifiableIterator<Entry<K, V>> entryItr = map.entrySet().iterator(); @Override
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Thu Nov 30 21:54:06 GMT 2023 - 3.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/reflect/ImmutableTypeToInstanceMapTest.java
ImmutableTypeToInstanceMap<Number> map = ImmutableTypeToInstanceMap.<Number>builder() .put(Integer.class, 0) .put(int.class, 1) .build(); assertEquals(2, map.size()); assertEquals(0, (int) map.getInstance(Integer.class)); assertEquals(0, (int) map.getInstance(TypeToken.of(Integer.class))); assertEquals(1, (int) map.getInstance(int.class));
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 6.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableMapValues.java
Object writeReplace() { return new SerializedForm<V>(map); } @GwtIncompatible // serialization @J2ktIncompatible private static class SerializedForm<V> implements Serializable { final ImmutableMap<?, V> map; SerializedForm(ImmutableMap<?, V> map) { this.map = map; } Object readResolve() { return map.values(); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Nov 30 21:54:06 GMT 2023 - 3K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ImmutableMapFloodingTest.java
COPY_OF_MAP { @Override public Map<Object, Object> create(List<?> keys) { Map<Object, Object> sourceMap = new LinkedHashMap<>(); for (Object k : keys) { if (sourceMap.put(k, "dummy value") != null) { throw new UnsupportedOperationException("duplicate key"); } } return ImmutableMap.copyOf(sourceMap); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Oct 03 21:01:39 GMT 2023 - 3.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ForMapMultimapAsMapImplementsMapTest.java
} @Override protected Map<String, Collection<Integer>> makeEmptyMap() { Map<String, Integer> map = Maps.newHashMap(); return Multimaps.forMap(map).asMap(); } @Override protected Map<String, Collection<Integer>> makePopulatedMap() { Map<String, Integer> map = Maps.newHashMap(); map.put("foo", 1); map.put("bar", 2); map.put("cow", 3); return Multimaps.forMap(map).asMap();
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Feb 19 20:34:55 GMT 2024 - 3K bytes - Viewed (0)