@Test public void testPut() { FastSafeIterableMap<Integer, Integer> map = new FastSafeIterableMap<>(); map.putIfAbsent(10, 20); map.putIfAbsent(20, 40); map.putIfAbsent(30, 60); assertThat(map.putIfAbsent(5, 10), is((Integer) null)); assertThat(map.putIfAbsent(10, 30), is(20)); }
@Override public V putIfAbsent(@NonNull K key, @NonNull V v) { Entry<K, V> current = get(key); if (current != null) { return current.mValue; } mHashMap.put(key, put(key, v)); return null; }
FastSafeIterableMap extends SafeIterableMap<K, V> { @Override public V putIfAbsent(@NonNull K key, @NonNull V v) { Entry<K, V> current = get(key); if (current != null) { return current.mValue; } mHashMap.put(key, put(key, v)); return null; } }
FastSafeIterableMap extends SafeIterableMap<K, V> { @Override public V putIfAbsent(@NonNull K key, @NonNull V v) { Entry<K, V> current = get(key); if (current != null) { return current.mValue; } mHashMap.put(key, put(key, v)); return null; }  }
FastSafeIterableMap extends SafeIterableMap<K, V> { @Override public V putIfAbsent(@NonNull K key, @NonNull V v) { Entry<K, V> current = get(key); if (current != null) { return current.mValue; } mHashMap.put(key, put(key, v)); return null; }  @Override V putIfAbsent(@NonNull K key, @NonNull V v); @Override V remove(@NonNull K key); boolean contains(K key); Map.Entry<K, V> ceil(K k); }
FastSafeIterableMap extends SafeIterableMap<K, V> { @Override public V putIfAbsent(@NonNull K key, @NonNull V v) { Entry<K, V> current = get(key); if (current != null) { return current.mValue; } mHashMap.put(key, put(key, v)); return null; }  @Override V putIfAbsent(@NonNull K key, @NonNull V v); @Override V remove(@NonNull K key); boolean contains(K key); Map.Entry<K, V> ceil(K k);  }