Returns an empty map (immutable). This map is serializable.
This example illustrates the type-safe way to obtain an empty map:
Map<String, Date> s = Collections.emptyMap();
<K> | the class of the map keys | |
<V> | the class of the map values |
EMPTY_MAP
@implNote Implementations of this method need not create a separate
Map
object for each call. Using this method is likely to have
comparable cost to using the like-named field. (Unlike this method, the
field does not provide type safety.)
Diagram: Collections