This Map method seemed smart.
This commit is contained in:
1 parent
bbf974f348
commit
1d59e348ed
1 file changed
+16
@@ -78,5 +78,21 @@ public class MassiveMap<K, V> extends LinkedHashMap<K, V>
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// METHODS
|
||||
// -------------------------------------------- //
|
||||
|
||||
public V set(K key, V value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return this.remove(key);
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.put(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user