Code example for HashMap

0
 
    public Map<KeyColumn, S> getLocksForTx(StoreTransaction tx) {
        Map<KeyColumn, S> m = locks.get(tx);
 
        if (null == m) {
            m = new HashMap<KeyColumn, S>();
            final Map<KeyColumn, S> x = locks.putIfAbsent(tx, m);
            if (null != x) {
                m = x;
            } 
        } 
 
        return m;
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java