Code example for ConcurrentHashMap

Methods: get, values

0
 
    } 
 
    public <T extends ConfigObjectType<T, C>, C extends ConfiguredObject<T, C>> Collection<? extends C> getConfiguredObjects(ConfigObjectType<T,C> type)
    { 
        ConcurrentHashMap typeMap = _typeMap.get(type);
        if(typeMap != null)
        { 
            return typeMap.values();
        } 
        else 
        { 
            return Collections.EMPTY_LIST;
        } 
 
    } 
 
    public <T extends ConfigObjectType<T, C>, C extends ConfiguredObject<T, C>> void addConfiguredObject(ConfiguredObject<T, C> object)
    { 
        ConcurrentHashMap typeMap = _typeMap.get(object.getConfigType());
        if(typeMap == null)