|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.shell.mng.MapManagerInput<K,V>
K
- the key type.V
- the value type.public class MapManagerInput<K,V>
This class is a concrete implemenation of ManagerInput. It provides a way to construct manager inputs from maps.
Constructor Summary | |
---|---|
MapManagerInput(java.util.Map<K,V> input)
Constructs a new manager input from the provided map with a null name. |
|
MapManagerInput(java.util.Map<K,V> input,
java.lang.String name)
Constructs a new manager input from the provided map and name. |
Method Summary | |
---|---|
java.lang.String |
getName()
Returns the name of this manager input. |
V |
getOptionalValue(java.lang.Object key)
Returns the value corresponding to the provided key. |
V |
getRequiredValue(java.lang.Object key)
Returns the value corresponding to the provided key. |
boolean |
hasValueFor(java.lang.Object key)
Indicates if a value exists for the provided key in this manager input. |
java.util.Map<K,V> |
toMap()
Returns the information contained in this input as a map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapManagerInput(java.util.Map<K,V> input, java.lang.String name)
input
- keys mapped to their respective values.name
- the name given to this manager input.public MapManagerInput(java.util.Map<K,V> input)
null
name.
input
- keys mapped to their respective values.Method Detail |
---|
public boolean hasValueFor(java.lang.Object key)
hasValueFor
in interface ManagerInput<K,V>
key
- the key whose presence in this input
is to be tested.
true
if this input contains a
value for the specified key.public V getOptionalValue(java.lang.Object key)
getOptionalValue
in interface ManagerInput<K,V>
key
- the key whose value is to be returned.
null
if the value does not exist.public V getRequiredValue(java.lang.Object key)
getRequiredValue
in interface ManagerInput<K,V>
key
- the key whose value is to be returned.
ApplicationException
- if the value does not exist.public java.util.Map<K,V> toMap()
toMap
in interface ManagerInput<K,V>
public java.lang.String getName()
getName
in interface ManagerInput<K,V>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |