public Map makeEmptyMap() { return new LinkedMap(); }
/** * Transforms a map. * <p> * The transformer itself may throw an exception if necessary. * * @param map the map to transform * @throws the transformed object */ protected Map transformMap(Map map) { if (map.isEmpty()) { return map; } Map result = new LinkedMap(map.size()); for (Iterator it = map.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); result.put(transformKey(entry.getKey()), transformValue(entry.getValue())); } return result; }
/** * Transforms a map. * <p> * The transformer itself may throw an exception if necessary. * * @param map the map to transform * @throws the transformed object */ protected Map transformMap(Map map) { if (map.isEmpty()) { return map; } Map result = new LinkedMap(map.size()); for (Iterator it = map.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); result.put(transformKey(entry.getKey()), transformValue(entry.getValue())); } return result; }
public Set makeEmptySet() { return MapBackedSet.decorate(new LinkedMap()); }
public void testClone() { LinkedMap map = new LinkedMap(10); map.put("1", "1"); Map cloned = (Map) map.clone(); assertEquals(map.size(), cloned.size()); assertSame(map.get("1"), cloned.get("1")); }
/** * Create a new instance with a given cache size. * @param cacheSize */ public ItemInfoCacheImpl(int cacheSize) { super(); this.cacheSize = cacheSize; entries = new LinkedMap(cacheSize); }
/** * Create a new instance with a given cache size. * @param cacheSize */ public ItemInfoCacheImpl(int cacheSize) { super(); this.cacheSize = cacheSize; entries = new LinkedMap(cacheSize); }
private static Map createLinkedMap(int initialCapacity) { // Commons Collections does not support initial capacity of 0. return new LinkedMap(initialCapacity == 0 ? 1 : initialCapacity); }
/** * Add the given instance to the dirty cache. */ public void addDirty(StateManagerImpl sm) { if (_dirty == null) { if (_orderDirty) _dirty = MapBackedSet.decorate(new LinkedMap()); else _dirty = new HashSet<StateManagerImpl>(); } if (_dirty.add(sm)) removeCleanInternal(sm); }
/** * Add the given instance to the dirty cache. */ public void addDirty(StateManagerImpl sm) { if (_dirty == null) { if (_orderDirty) _dirty = MapBackedSet.decorate(new LinkedMap()); else _dirty = new HashSet<StateManagerImpl>(); } if (_dirty.add(sm)) removeCleanInternal(sm); }
/** * Add the given instance to the dirty cache. */ public void addDirty(StateManagerImpl sm) { if (_dirty == null) { if (_orderDirty) _dirty = MapBackedSet.decorate(new LinkedMap()); else _dirty = new HashSet<StateManagerImpl>(); } if (_dirty.add(sm)) removeCleanInternal(sm); }
/** * Add the given instance to the dirty cache. */ public void addDirty(StateManagerImpl sm) { if (_dirty == null) { if (_orderDirty) _dirty = MapBackedSet.decorate(new LinkedMap()); else _dirty = new HashSet<StateManagerImpl>(); } if (_dirty.add(sm)) removeCleanInternal(sm); }
public LinkedMap getParameterTypes(StoreQuery q) { LinkedMap result = new LinkedMap(); result.putAll(getOrderedParameterTypes(q)); return result; }
public LinkedMap getParameterTypes(StoreQuery q) { LinkedMap result = new LinkedMap(); result.putAll(getOrderedParameterTypes(q)); return result; }
public LinkedMap getParameterTypes(StoreQuery q) { LinkedMap result = new LinkedMap(); result.putAll(getOrderedParameterTypes(q)); return result; }
public LinkedMap getParameterTypes(StoreQuery q) { LinkedMap result = new LinkedMap(); result.putAll(getOrderedParameterTypes(q)); return result; }
public LinkedMap getParameterTypes() { lock(); try { LinkedMap wrap = new LinkedMap(); wrap.putAll(compileForExecutor().getOrderedParameterTypes(_storeQuery)); return wrap; } finally { unlock(); } }
public LinkedMap getParameterTypes() { lock(); try { LinkedMap wrap = new LinkedMap(); wrap.putAll(compileForExecutor().getOrderedParameterTypes(_storeQuery)); return wrap; } finally { unlock(); } }
public LinkedMap getParameterTypes() { lock(); try { LinkedMap wrap = new LinkedMap(); wrap.putAll(compileForExecutor().getOrderedParameterTypes(_storeQuery)); return wrap; } finally { unlock(); } }
public LinkedMap getParameterTypes() { lock(); try { LinkedMap wrap = new LinkedMap(); wrap.putAll(compileForExecutor().getOrderedParameterTypes(_storeQuery)); return wrap; } finally { unlock(); } }