Package org.fakereplace.com.google.common.collect

Examples of org.fakereplace.com.google.common.collect.MapMaker


        this.weakKeys = weakKeys;
    }

    public ConcurrentMap<K, V> apply(F from) {
        if (weakKeys) {
            return new MapMaker().weakKeys().makeMap();
        } else {
            return new MapMaker().makeMap();
        }
    }
View Full Code Here


    private static ConcurrentMap<String, Set<Object>> data = new ConcurrentHashMap<String, Set<Object>>();

    public static void add(String type, Object object) {
        Set<Object> set = data.get(type);
        if(set == null) {
            set = Collections.newSetFromMap(new MapMaker().weakKeys().<Object, Boolean>makeMap());
            Set<Object> existing = data.putIfAbsent(type, set);
            if(existing != null) {
                set = existing;
            }
        }
View Full Code Here

TOP

Related Classes of org.fakereplace.com.google.common.collect.MapMaker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.