|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.RestrictedCollections.RestrictedMap
public static class RestrictedCollections.RestrictedMap
A restricted Map that requires its keys and values to be of specified classes.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry |
| Field Summary | |
|---|---|
protected java.lang.Class |
m_clzKeyThe class of key stored in the Map. |
protected java.lang.Class |
m_clzValThe class of value stored in the Map. |
protected java.util.Map |
m_mapThe underlying Map. |
protected java.util.Set |
m_setThe Entry Set. |
| Constructor Summary | |
|---|---|
RestrictedCollections.RestrictedMap(java.util.Map map, java.lang.Class clzKey, java.lang.Class clzVal)Constructor. |
|
| Method Summary | |
|---|---|
protected void |
checkKey(java.lang.Object o)Check the passed object to verify that it passes the "key" restriction of this Map. |
protected void |
checkValue(java.lang.Object o)Check the passed object to verify that it passes the "value" restriction of this Map. |
void |
clear()Removes all mappings from this map. |
boolean |
containsKey(java.lang.Object key)Returns true if this map contains a mapping for the specified key. |
boolean |
containsValue(java.lang.Object value)Returns true if this map maps one or more keys to the specified value. |
java.util.Set |
entrySet()Returns a set view of the mappings contained in this map. |
boolean |
equals(java.lang.Object o)Compares the specified object with this map for equality. |
java.lang.Object |
get(java.lang.Object key)Returns the value to which this map maps the specified key. |
int |
hashCode()Returns the hash code value for this map. |
boolean |
isEmpty()Returns true if this map contains no key-value mappings. |
java.util.Set |
keySet()Returns a set view of the keys contained in this map. |
java.lang.Object |
put(java.lang.Object key, java.lang.Object value)Associates the specified value with the specified key in this map. |
void |
putAll(java.util.Map map)Copies all of the mappings from the specified map to this map. |
java.lang.Object |
remove(java.lang.Object key)Removes the mapping for this key from this map if present. |
int |
size()Returns the number of key-value mappings in this map. |
java.lang.String |
toString()Return a String description for this Map. |
java.util.Collection |
values()Returns a collection view of the values contained in this map. |
| Field Detail |
|---|
protected java.util.Map m_map
protected java.lang.Class m_clzKey
protected java.lang.Class m_clzVal
protected java.util.Set m_set
| Constructor Detail |
|---|
public RestrictedCollections.RestrictedMap(java.util.Map map,
java.lang.Class clzKey,
java.lang.Class clzVal)
map - the underlying MapclzKey - the class of keys that may be stored in the MapclzVal - the class of values that may be stored in the Map| Method Detail |
|---|
public int size()
size in interface java.util.Mappublic boolean isEmpty()
isEmpty in interface java.util.Mappublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Mapkey - key whose presence in this map is to be testedpublic boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Mapvalue - value whose presence in this map is to be testedpublic java.lang.Object get(java.lang.Object key)
get in interface java.util.Mapkey - key whose associated value is to be returned
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in interface java.util.Mapkey - key with which the specified value is to be associatedvalue - value to be associated with the specified keyjava.lang.ClassCastException - if the class of the specified key or value prevents it from being stored in this map.public java.lang.Object remove(java.lang.Object key)
remove in interface java.util.Mapkey - key whose mapping is to be removed from the mappublic void putAll(java.util.Map map)
putAll in interface java.util.Mapmap - Mappings to be stored in this mapjava.lang.ClassCastException - if the class of a key or value in the specified map prevents it from being stored in this mappublic void clear()
clear in interface java.util.Mappublic java.util.Set keySet()
keySet in interface java.util.Mappublic java.util.Collection values()
values in interface java.util.Mappublic java.util.Set entrySet()
entrySet in interface java.util.Mappublic boolean equals(java.lang.Object o)
equals in interface java.util.Mapo - object to be compared for equality with this mappublic int hashCode()
hashCode in interface java.util.Mappublic java.lang.String toString()
protected void checkKey(java.lang.Object o)
o - the Object to checkjava.lang.ClassCastException - if the class of the passed Object prevents it from being used as a key in this Mapprotected void checkValue(java.lang.Object o)
o - the Object to checkjava.lang.ClassCastException - if the class of the passed Object prevents it from being used as a value in this Map
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||