Code example for MapMaker

     * Creates a new, empty ConcurrentHashSet.  
    public ConcurrentHashSet() { 
    	// had some really weird NPEs with Java's ConcurrentHashMap (i.e. got a 
    	// NPE at size()), now trying witrh Guava instead 
        delegate = new MapMaker().concurrencyLevel
    public int size() { 
        return delegate.size();
    public boolean contains(Object o) { 
        return delegate.containsKey(o);
Connect your IDE to all the code out there  Get Codota for Java