HomeSort by relevance Sort by last modified time
    Searched refs:putIfAbsent (Results 1 - 25 of 81) sorted by null

1 2 3 4

  /external/guava/guava/src/com/google/common/collect/
ForwardingConcurrentMap.java 42 public V putIfAbsent(K key, V value) {
43 return delegate().putIfAbsent(key, value);
Interners.java 48 E canonical = map.putIfAbsent(checkNotNull(sample), sample);
77 Dummy sneaky = map.putIfAbsent(sample, Dummy.VALUE);
ConcurrentHashMultiset.java 229 existingCounter = countMap.putIfAbsent(element, new AtomicInteger(occurrences));
254 if ((countMap.putIfAbsent(element, newCounter) == null)
356 existingCounter = countMap.putIfAbsent(element, new AtomicInteger(count));
371 if ((countMap.putIfAbsent(element, newCounter) == null)
414 return countMap.putIfAbsent(element, new AtomicInteger(newCount)) == null;
426 return (countMap.putIfAbsent(element, newCounter) == null)
  /external/guava/guava-gwt/src-super/java/util/super/java/util/concurrent/
ConcurrentMap.java 28 V putIfAbsent(K key, V value);
ConcurrentHashMap.java 56 public V putIfAbsent(K key, V value) {
  /libcore/luni/src/main/java/java/util/concurrent/
ConcurrentMap.java 16 * {@code putIfAbsent}, {@code remove}, and {@code replace} methods.
59 V putIfAbsent(K key, V value);
  /external/guava/guava-tests/test/com/google/common/collect/
ForwardingConcurrentMapTest.java 43 assertEquals(Integer.valueOf(1), map.putIfAbsent("foo", 2));
45 assertNull(map.putIfAbsent("bar", 3));
ConcurrentHashMultisetTest.java 98 expect(backingMap.putIfAbsent(eq(KEY), isA(AtomicInteger.class))).andReturn(null);
137 * the putIfAbsent returns a non-null value, and the case where the replace() of an observed
146 // since get returned null, try a putIfAbsent; that fails due to a simulated race
147 expect(backingMap.putIfAbsent(eq(KEY), isA(AtomicInteger.class))).andReturn(existingZero);
148 // since the putIfAbsent returned a zero, we'll try to replace...
151 // ...and then putIfAbsent. Simulate failure on both
152 expect(backingMap.putIfAbsent(eq(KEY), isA(AtomicInteger.class))).andReturn(existing);
159 expect(backingMap.putIfAbsent(eq(KEY), isA(AtomicInteger.class))).andReturn(existing);
  /external/guava/guava/src/com/google/common/util/concurrent/
AtomicLongMap.java 94 atomic = map.putIfAbsent(key, new AtomicLong(delta));
143 atomic = map.putIfAbsent(key, new AtomicLong(delta));
178 atomic = map.putIfAbsent(key, new AtomicLong(newValue));
326 * first decrementing to zero, and then removing. putIfAbsent or replace could observe the
331 * - Define putIfAbsent and replace as treating zero and absent identically (as currently
332 * implemented below). This is a bit surprising with putIfAbsent, which really becomes
335 * - Allow putIfAbsent and replace to distinguish between zero and absent, but don't implement
350 long putIfAbsent(K key, long newValue) {
354 atomic = map.putIfAbsent(key, new AtomicLong(newValue));
385 return putIfAbsent(key, newValue) == 0L
    [all...]
  /external/jmdns/src/javax/jmdns/impl/
ListenerStatus.java 59 if (null == _addedServices.putIfAbsent(qualifiedName, event.getInfo().clone())) {
99 if (null == _addedServices.putIfAbsent(qualifiedName, info.clone())) {
176 if (null == _addedTypes.putIfAbsent(event.getType(), event.getType())) {
194 if (null == _addedTypes.putIfAbsent(event.getType(), event.getType())) {
DNSStatefulObject.java 61 _semaphores.putIfAbsent(thread, semaphore);
DNSTaskStarter.java 130 _instances.putIfAbsent(jmDNSImpl, newDNSTaskStarter(jmDNSImpl));
  /external/guava/guava-testlib/src/com/google/common/collect/testing/
ConcurrentMapInterfaceTest.java 83 V oldValue = map.putIfAbsent(keyToPut, valueToPut);
91 map.putIfAbsent(keyToPut, valueToPut);
114 assertEquals(oldValue, map.putIfAbsent(keyToPut, valueToPut));
122 map.putIfAbsent(keyToPut, valueToPut);
146 map.putIfAbsent(null, valueToPut);
153 map.putIfAbsent(null, valueToPut);
180 map.putIfAbsent(keyToPut, null);
187 map.putIfAbsent(keyToPut, null);
214 assertNull(map.putIfAbsent(keyToPut, null));
220 map.putIfAbsent(keyToPut, null)
    [all...]
  /external/smali/dexlib2/src/main/java/org/jf/dexlib2/writer/builder/
BuilderStringPool.java 53 ret = internedItems.putIfAbsent(string, stringReference);
BuilderTypePool.java 59 ret = internedItems.putIfAbsent(type, typeReference);
BuilderAnnotationPool.java 64 ret = internedItems.putIfAbsent(dexBuilderAnnotation, dexBuilderAnnotation);
BuilderAnnotationSetPool.java 76 ret = internedItems.putIfAbsent(annotationSet, annotationSet);
BuilderFieldPool.java 69 ret = internedItems.putIfAbsent(dexPoolFieldReference, dexPoolFieldReference);