This Map method seemed smart.

This commit is contained in:
Olof Larsson 2015-12-16 20:31:35 +01:00
parent bbf974f348
commit 1d59e348ed

View File

@ -79,4 +79,20 @@ public class MassiveMap<K, V> extends LinkedHashMap<K, V>
return ret; return ret;
} }
// -------------------------------------------- //
// METHODS
// -------------------------------------------- //
public V set(K key, V value)
{
if (value == null)
{
return this.remove(key);
}
else
{
return this.put(key, value);
}
}
} }