public abstract class EnumeratedMap
extends java.lang.Object
implements java.util.Map
This is a Map implementation driven by a data source that only provides an enumeration of keys and a getValue(key) method. This class must be subclassed to implement those methods.
Some of the methods may incur a performance penalty that involves enumerating the entire data source. In these cases, the Map will try to save the results of that enumeration, but only if the underlying data source is immutable.
| Constructor and Description |
|---|
EnumeratedMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object pKey) |
boolean |
containsValue(java.lang.Object pValue) |
java.util.Set |
entrySet() |
abstract java.util.Enumeration |
enumerateKeys()
Returns an enumeration of the keys
|
java.lang.Object |
get(java.lang.Object pKey) |
java.util.Map |
getAsMap()
Converts the MapSource to a Map.
|
abstract java.lang.Object |
getValue(java.lang.Object pKey)
Returns the value associated with the given key, or null if not
found.
|
boolean |
isEmpty() |
abstract boolean |
isMutable()
Returns true if it is possible for this data source to change
|
java.util.Set |
keySet() |
java.lang.Object |
put(java.lang.Object pKey,
java.lang.Object pValue) |
void |
putAll(java.util.Map pMap) |
java.lang.Object |
remove(java.lang.Object pKey) |
int |
size() |
java.util.Collection |
values() |
public void clear()
clear in interface java.util.Mappublic boolean containsKey(java.lang.Object pKey)
containsKey in interface java.util.Mappublic boolean containsValue(java.lang.Object pValue)
containsValue in interface java.util.Mappublic java.util.Set entrySet()
entrySet in interface java.util.Mappublic java.lang.Object get(java.lang.Object pKey)
get in interface java.util.Mappublic boolean isEmpty()
isEmpty in interface java.util.Mappublic java.util.Set keySet()
keySet in interface java.util.Mappublic java.lang.Object put(java.lang.Object pKey,
java.lang.Object pValue)
put in interface java.util.Mappublic void putAll(java.util.Map pMap)
putAll in interface java.util.Mappublic java.lang.Object remove(java.lang.Object pKey)
remove in interface java.util.Mappublic int size()
size in interface java.util.Mappublic java.util.Collection values()
values in interface java.util.Mappublic abstract java.util.Enumeration enumerateKeys()
public abstract boolean isMutable()
public abstract java.lang.Object getValue(java.lang.Object pKey)
public java.util.Map getAsMap()
Copyright (c) 1999-2012 Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.