Code example for ConcurrentHashMap

Methods: putIfAbsent

0
     * @see java.util.concurrent.ConcurrentHashMap#putIfAbsent(Object, Object) 
     * @param key 
     * @param value 
     */ 
    public Object setAttributeIfAbsent(final String key, final Object value) {
        return this.attributes.putIfAbsent(key, value);
    } 
 
 
    /** 
     * »ñÈ¡keyÖ¸¶¨µÄÊôÐÔ 
     *  
     * @param key 
     * @return 
     */ 
    public Object getAttribute(final String key) {
        return this.attributes.get(key);
    } 
 
 
    /**