Methods Summary |
---|
public void | clear()Removes all elements from this {@code Map}, leaving it empty.
|
public boolean | containsKey(java.lang.Object key)Returns whether this {@code Map} contains the specified key.
|
public boolean | containsValue(java.lang.Object value)Returns whether this {@code Map} contains the specified value.
|
public java.util.Set | entrySet()Returns a {@code Set} containing all of the mappings in this {@code Map}. Each mapping is
an instance of {@link Map.Entry}. As the {@code Set} is backed by this {@code Map},
changes in one will be reflected in the other.
|
public boolean | equals(java.lang.Object object)Compares the argument to the receiver, and returns {@code true} if the
specified object is a {@code Map} and both {@code Map}s contain the same mappings.
|
public V | get(java.lang.Object key)Returns the value of the mapping with the specified key.
|
public int | hashCode()Returns an integer hash code for the receiver. {@code Object}s which are equal
return the same value for this method.
|
public boolean | isEmpty()Returns whether this map is empty.
|
public java.util.Set | keySet()Returns a set of the keys contained in this {@code Map}. The {@code Set} is backed by
this {@code Map} so changes to one are reflected by the other. The {@code Set} does not
support adding.
|
public V | put(K key, V value)Maps the specified key to the specified value.
|
public void | putAll(java.util.Map map)Copies every mapping in the specified {@code Map} to this {@code Map}.
|
public V | remove(java.lang.Object key)Removes a mapping with the specified key from this {@code Map}.
|
public int | size()Returns the number of mappings in this {@code Map}.
|
public java.util.Collection | values()Returns a {@code Collection} of the values contained in this {@code Map}. The {@code Collection}
is backed by this {@code Map} so changes to one are reflected by the other. The
{@code Collection} supports {@link Collection#remove}, {@link Collection#removeAll},
{@link Collection#retainAll}, and {@link Collection#clear} operations,
and it does not support {@link Collection#add} or {@link Collection#addAll} operations.
This method returns a {@code Collection} which is the subclass of
{@link AbstractCollection}. The {@link AbstractCollection#iterator} method of this subclass returns a
"wrapper object" over the iterator of this {@code Map}'s {@link #entrySet()}. The {@link AbstractCollection#size} method
wraps this {@code Map}'s {@link #size} method and the {@link AbstractCollection#contains} method wraps this {@code Map}'s
{@link #containsValue} method.
The collection is created when this method is called at first time and
returned in response to all subsequent calls. This method may return
different Collection when multiple calls to this method, since it has no
synchronization performed.
|