Java 类org.apache.commons.collections.map.CompositeMap 实例源码

项目:welshare    文件:FlashScopeInterceptor.java   
public Object put(CompositeMap map, Map[] composited, Object key,
        Object value) {
    if (composited.length < 1) {
        throw new UnsupportedOperationException(
                "No composites to add elements to");
    }
    Object result = map.get(key);
    if (result != null) {
        map.remove(key);
    }
    composited[composited.length - 1].put(key, value);
    return result;
}
项目:welshare    文件:FlashScopeInterceptor.java   
public void putAll(CompositeMap map, Map[] composited, Map mapToAdd) {
    for (Entry entry : (Set<Entry>) mapToAdd.entrySet()) {
        put(map, composited, entry.getKey(), entry.getValue());
    }
}
项目:welshare    文件:FlashScopeInterceptor.java   
public void resolveCollision(CompositeMap composite, Map existing,
        Map added, Collection intersect) {
    existing.keySet().removeAll(intersect);
}