K
- the type of the keys in this mapV
- the type of the values in this mappublic interface Put<K,V>
Map
interface.
NOTE: in the original Map
interface, Map.put(Object, Object)
is known
to have the same return type as Map.get(Object)
, namely V
. Put
makes no assumptions in this regard (there is no association with, nor even knowledge
of, a "reading" interface) and thus defines put(Object, Object)
as returning
Object
.
Get
void clear()
Map.clear()
Object put(K key, V value)
key
- key with which the specified value is to be associatedvalue
- value to be associated with the specified keykey
, or
null
if there was no mapping for key
.
(A null
return can also indicate that the map
previously associated null
with key
,
if the implementation supports null
values.)Map.put(Object, Object)
void putAll(Map<? extends K,? extends V> t)
t
- mappings to be stored in this mapMap.putAll(Map)
Copyright © 2001–2019 The Apache Software Foundation. All rights reserved.