- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for putIfAbsent (0.09 sec)
-
android/guava-testlib/src/com/google/common/collect/testing/testers/MapPutIfAbsentTester.java
public void testPutIfAbsent_supportedAbsent() { assertNull( "putIfAbsent(notPresent, value) should return null", getMap().putIfAbsent(k3(), v3())); expectAdded(e3()); } @MapFeature.Require(SUPPORTS_PUT) @CollectionSize.Require(absent = ZERO) public void testPutIfAbsent_supportedPresent() { assertEquals( "putIfAbsent(present, value) should return existing value", v0(),
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:51:04 UTC 2024 - 4.9K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/ConcurrentMapPutIfAbsentTester.java
assertNull("putIfAbsent(notPresent, value) should return null", putIfAbsent(e3())); expectAdded(e3()); } @MapFeature.Require(SUPPORTS_PUT) @CollectionSize.Require(absent = ZERO) public void testPutIfAbsent_supportedPresent() { assertEquals( "putIfAbsent(present, value) should return existing value", v0(), getMap().putIfAbsent(k0(), v3())); expectUnchanged(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 20:00:30 UTC 2024 - 4.7K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/MapPutIfAbsentTester.java
public void testPutIfAbsent_supportedAbsent() { assertNull( "putIfAbsent(notPresent, value) should return null", getMap().putIfAbsent(k3(), v3())); expectAdded(e3()); } @MapFeature.Require(SUPPORTS_PUT) @CollectionSize.Require(absent = ZERO) public void testPutIfAbsent_supportedPresent() { assertEquals( "putIfAbsent(present, value) should return existing value", v0(),
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 20:00:30 UTC 2024 - 4.8K bytes - Viewed (0) -
guava/src/com/google/common/collect/ForwardingConcurrentMap.java
protected ForwardingConcurrentMap() {} @Override protected abstract ConcurrentMap<K, V> delegate(); @CanIgnoreReturnValue @Override @CheckForNull public V putIfAbsent(K key, V value) { return delegate().putIfAbsent(key, value); } @CanIgnoreReturnValue @Override public boolean remove(@CheckForNull Object key, @CheckForNull Object value) { return delegate().remove(key, value); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jun 29 19:42:21 UTC 2021 - 2.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ForwardingConcurrentMapTest.java
} } public void testPutIfAbsent() { TestMap map = new TestMap(); map.put("foo", 1); assertEquals(Integer.valueOf(1), map.putIfAbsent("foo", 2)); assertEquals(Integer.valueOf(1), map.get("foo")); assertNull(map.putIfAbsent("bar", 3)); assertEquals(Integer.valueOf(3), map.get("bar")); } public void testRemove() { TestMap map = new TestMap(); map.put("foo", 1);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.4K bytes - Viewed (0) -
impl/maven-core/src/main/java/org/apache/maven/internal/impl/Graph.java
} private static List<String> visitAll( Collection<Vertex> children, Map<Vertex, DfsState> stateMap, List<String> list) { for (Vertex v : children) { DfsState state = stateMap.putIfAbsent(v, DfsState.VISITING); if (state == null) { visitAll(v.children, stateMap, list); stateMap.put(v, DfsState.VISITED); list.add(v.label); } }
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 4.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ForwardingConcurrentMap.java
protected ForwardingConcurrentMap() {} @Override protected abstract ConcurrentMap<K, V> delegate(); @CanIgnoreReturnValue @Override @CheckForNull public V putIfAbsent(K key, V value) { return delegate().putIfAbsent(key, value); } @CanIgnoreReturnValue @Override public boolean remove(@CheckForNull Object key, @CheckForNull Object value) { return delegate().remove(key, value); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jun 29 19:42:21 UTC 2021 - 2.5K bytes - Viewed (0) -
src/main/java/org/codelibs/core/beans/factory/BeanDescFactory.java
*/ package org.codelibs.core.beans.factory; import static org.codelibs.core.collection.CollectionsUtil.newConcurrentHashMap; import static org.codelibs.core.collection.CollectionsUtil.putIfAbsent; import static org.codelibs.core.misc.AssertionUtil.assertArgumentNotNull; import java.util.concurrent.ConcurrentMap; import org.codelibs.core.beans.BeanDesc; import org.codelibs.core.beans.impl.BeanDescImpl;
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 2.9K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/entity/ParamMap.java
@Override public void replaceAll(final BiFunction<? super K, ? super V, ? extends V> function) { parent.replaceAll(function); } @Override public V putIfAbsent(final K key, final V value) { return parent.putIfAbsent(key, value); } @Override public boolean remove(final Object key, final Object value) { if (parent.remove(key, value)) { return true;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 5.3K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/interval/impl/HostIntervalController.java
try { final URL u = new URL(url); final String host = u.getHost(); if (host == null) { return; } final AtomicLong lastTime = lastTimes.putIfAbsent(host, new AtomicLong(SystemUtil.currentTimeMillis())); if (lastTime == null) { return; } synchronized (lastTime) { while (true) {
Registered: Sun Nov 10 03:50:12 UTC 2024 - Last Modified: Thu Feb 22 01:36:27 UTC 2024 - 3K bytes - Viewed (0)