@Test public void testRemove(){ Integer key1 = 1; Integer key2 = 2; String value1 = new String("value 1"); String value2 = new String("value 2"); ObjectCache cache = new DefaultObjectCache(); assertNotNull(cache); assertEquals(null, cache.get(key1)); assertEquals(1, cache.getKeys().size()); cache.remove(key1); assertEquals(0, cache.getKeys().size()); cache.put(key1, value1); assertEquals(1, cache.getKeys().size()); cache.remove(key1); assertEquals(0, cache.getKeys().size()); }
public void remove(Object key) { synchronized (cache) { cache.remove(key); } }
DefaultObjectCache implements ObjectCache { public void remove(Object key) { synchronized (cache) { cache.remove(key); } } }
DefaultObjectCache implements ObjectCache { public void remove(Object key) { synchronized (cache) { cache.remove(key); } } DefaultObjectCache();  DefaultObjectCache(final int initialSize); }
DefaultObjectCache implements ObjectCache { public void remove(Object key) { synchronized (cache) { cache.remove(key); } } DefaultObjectCache();  DefaultObjectCache(final int initialSize); void clear(); boolean containsKey(final Object key); Object get(final Object key); Object peek(final Object key); void writeLock(final Object key); void writeUnLock(final Object key); void put(final Object key, final Object object); Set<Object> getKeys(); void remove(Object key); }
DefaultObjectCache implements ObjectCache { public void remove(Object key) { synchronized (cache) { cache.remove(key); } } DefaultObjectCache();  DefaultObjectCache(final int initialSize); void clear(); boolean containsKey(final Object key); Object get(final Object key); Object peek(final Object key); void writeLock(final Object key); void writeUnLock(final Object key); void put(final Object key, final Object object); Set<Object> getKeys(); void remove(Object key);  }