@Override public V put(K key, V value) { if (backingStore == null) { backingStore = new SmallMap<>(); backingStore.put(key, value); return null; } else { if (backingStore instanceof SmallMap) { V result = backingStore.put(key, value); if (backingStore.size() > cutOff) { transferBackingStore(); } return result; } else { return backingStore.put(key, value); } } }
if (inherit != null) { if (inheritCache == null) { inheritCache = new BimodalMap<>(5); if (!m.isAbstract() && m.getSelector().equals(selector)) { if (inheritCache == null) { inheritCache = new BimodalMap<>(5); inheritCache = new BimodalMap<>(5);
if (inherit != null) { if (inheritCache == null) { inheritCache = new BimodalMap<>(5); if (!m.isAbstract() && m.getSelector().equals(selector)) { if (inheritCache == null) { inheritCache = new BimodalMap<>(5); inheritCache = new BimodalMap<>(5);
@Test public void testBimodalMap() { Map<Integer, Integer> M = new BimodalMap<>(3); Integer I1 = Integer.valueOf(1); Integer I2 = Integer.valueOf(2);
@Override public V put(K key, V value) { if (backingStore == null) { backingStore = new SmallMap<>(); backingStore.put(key, value); return null; } else { if (backingStore instanceof SmallMap) { V result = backingStore.put(key, value); if (backingStore.size() > cutOff) { transferBackingStore(); } return result; } else { return backingStore.put(key, value); } } }
@Override public V put(K key, V value) { if (backingStore == null) { backingStore = new SmallMap<>(); backingStore.put(key, value); return null; } else { if (backingStore instanceof SmallMap) { V result = backingStore.put(key, value); if (backingStore.size() > cutOff) { transferBackingStore(); } return result; } else { return backingStore.put(key, value); } } }
backingStore.putAll(t); if (backingStore.size() > cutOff) { transferBackingStore();
backingStore.putAll(t); if (backingStore.size() > cutOff) { transferBackingStore();
backingStore.putAll(t); if (backingStore.size() > cutOff) { transferBackingStore();