/** * Puts a new key-value pair in the map. * * @param key * Pair key. * @param entry * Pair value. */ public void put(HashMapKey key, T entry) { synchronized (instanceLock) { this.createIfNecessary(); this.cache.put(key, entry); } }
/** * Puts a new key-value pair in the map. * * @param key * Pair key. * @param entry * Pair value. */ public void put(HashMapKey key, T entry) { if (!SwingUtilities.isEventDispatchThread()) throw new IllegalArgumentException( "Called outside Event Dispatch Thread"); this.createIfNecessary(); this.cache.put(key, entry); }