public abstract class EnumeratedMap extends Object implements 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(Object pKey) |
boolean |
containsValue(Object pValue) |
Set |
entrySet() |
abstract Enumeration |
enumerateKeys()
Returns an enumeration of the keys
|
Object |
get(Object pKey) |
Map |
getAsMap()
Converts the MapSource to a Map.
|
abstract Object |
getValue(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
|
Set |
keySet() |
Object |
put(Object pKey,
Object pValue) |
void |
putAll(Map pMap) |
Object |
remove(Object pKey) |
int |
size() |
Collection |
values() |
public boolean containsKey(Object pKey)
containsKey
in interface Map
public boolean containsValue(Object pValue)
containsValue
in interface Map
public Collection values()
public abstract Enumeration enumerateKeys()
public abstract boolean isMutable()
public abstract Object getValue(Object pKey)
public Map getAsMap()
Copyright © 2018 JBoss by Red Hat. All rights reserved.