Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.java.util
Class WeakHashMap

java.lang.Object
  extended by oracle.adfnmc.java.util.AbstractMap
      extended by oracle.adfnmc.java.util.WeakHashMap
All Implemented Interfaces:
Map

public class WeakHashMap
extends AbstractMap

Internal: Applications should not use this class.


Constructor Summary
WeakHashMap()
          Constructs a new empty instance of WeakHashMap.
WeakHashMap(int capacity)
          Constructs a new instance of WeakHashMap with the specified capacity.
WeakHashMap(int capacity, float loadFactor)
          Constructs a new instance of WeakHashMap with the specified capacity and load factor.
WeakHashMap(Map map)
           
 
Method Summary
 void clear()
          Removes all elements from this Map, leaving it empty.
 boolean containsKey(java.lang.Object key)
          Searches this Map for the specified key.
 boolean containsValue(java.lang.Object value)
          Searches this Map for the specified value.
 Set entrySet()
          Returns a Set of Map.Entrys that represent the entries in this Map.
 java.lang.Object get(java.lang.Object key)
          Answers the value of the mapping with the specified key.
 boolean isEmpty()
          Answers if this Map has no elements, a size of zero.
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Maps the specified key to the specified value.
 void putAll(Map map)
          Copies all the mappings in the given map to this map.
 java.lang.Object remove(java.lang.Object key)
          Removes a mapping with the specified key from this Map.
 int size()
          Answers the number of elements in this Map.
 
Methods inherited from class oracle.adfnmc.java.util.AbstractMap
clone, equals, hashCode, keySet, toString, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WeakHashMap

public WeakHashMap()
Constructs a new empty instance of WeakHashMap.


WeakHashMap

public WeakHashMap(int capacity)
Constructs a new instance of WeakHashMap with the specified capacity.

Parameters:
capacity - the initial capacity of this WeakHashMap
Throws:
java.lang.IllegalArgumentException - when the capacity is less than zero

WeakHashMap

public WeakHashMap(int capacity,
                   float loadFactor)
Constructs a new instance of WeakHashMap with the specified capacity and load factor.

Parameters:
capacity - the initial capacity
loadFactor - the initial load factor
Throws:
java.lang.IllegalArgumentException - when the capacity is less than zero or the load factor is less or equal to zero

WeakHashMap

public WeakHashMap(Map map)
Method Detail

containsKey

public boolean containsKey(java.lang.Object key)
Description copied from class: AbstractMap
Searches this Map for the specified key.

Specified by:
containsKey in interface Map
Overrides:
containsKey in class AbstractMap
Parameters:
key - the object to search for
Returns:
true if key is a key of this Map, false otherwise

containsValue

public boolean containsValue(java.lang.Object value)
Description copied from class: AbstractMap
Searches this Map for the specified value.

Specified by:
containsValue in interface Map
Overrides:
containsValue in class AbstractMap
Parameters:
value - the object to search for
Returns:
true if value is a value of this Map, false otherwise

size

public int size()
Description copied from class: AbstractMap
Answers the number of elements in this Map.

Specified by:
size in interface Map
Overrides:
size in class AbstractMap
Returns:
the number of elements in this Map

isEmpty

public boolean isEmpty()
Description copied from class: AbstractMap
Answers if this Map has no elements, a size of zero.

Specified by:
isEmpty in interface Map
Overrides:
isEmpty in class AbstractMap
Returns:
true if this Map has no elements, false otherwise
See Also:
AbstractMap.size()

get

public java.lang.Object get(java.lang.Object key)
Description copied from class: AbstractMap
Answers the value of the mapping with the specified key.

Specified by:
get in interface Map
Overrides:
get in class AbstractMap
Parameters:
key - the key
Returns:
the value of the mapping with the specified key

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Description copied from class: AbstractMap
Maps the specified key to the specified value.

Specified by:
put in interface Map
Overrides:
put in class AbstractMap
Parameters:
key - the key
value - the value
Returns:
the value of any previous mapping with the specified key or null if there was no mapping

remove

public java.lang.Object remove(java.lang.Object key)
Description copied from class: AbstractMap
Removes a mapping with the specified key from this Map.

Specified by:
remove in interface Map
Overrides:
remove in class AbstractMap
Parameters:
key - the key of the mapping to remove
Returns:
the value of the removed mapping or null if key is not a key in this Map

entrySet

public Set entrySet()
Description copied from class: AbstractMap
Returns a Set of Map.Entrys that represent the entries in this Map. Making changes to this Set will change the original Map and vice-versa. Entries can be removed from the Set, or their values can be changed, but new entries cannot be added to the Set.

Specified by:
entrySet in interface Map
Specified by:
entrySet in class AbstractMap
Returns:
a Set of Map.Entrys representing the entries in this Map

clear

public void clear()
Description copied from class: AbstractMap
Removes all elements from this Map, leaving it empty.

Specified by:
clear in interface Map
Overrides:
clear in class AbstractMap
See Also:
AbstractMap.isEmpty(), AbstractMap.size()

putAll

public void putAll(Map map)
Copies all the mappings in the given map to this map. These mappings will replace all mappings that this map had for any of the keys currently in the given map.

Specified by:
putAll in interface Map
Overrides:
putAll in class AbstractMap
Parameters:
map - the Map to copy mappings from
Throws:
java.lang.NullPointerException - if the given map is null

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.