|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.core.MapOutput
public class MapOutput
A simple Output implementation backed up by a java.util.HashMap. You may use this class as a mock for testing.
| Constructor Summary | |
|---|---|
MapOutput()
|
|
| Method Summary | |
|---|---|
String |
add(Object value)
Add an object with a auto generated key. |
Object |
getValue(String name)
Gets an output value by name. |
boolean |
has(String key)
Check if the output has this key. |
boolean |
isEmpty()
Returns true is this output has no values. |
Iterator<String> |
keys()
Gets an iterator with the names of each output value. |
void |
removeValue(String name)
Removes an output value by name. |
void |
setObject(Object bean)
Sets the properties of the given bean in the action output, in other words, extract all attributes from the given object and place them in the action output. |
void |
setObject(Object bean,
String prefix)
Sets the properties of the given bean in the action output, in other words, extract all attributes from the given object and place them in the action output. |
void |
setValue(String name,
Object value)
Sets an output value by name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapOutput()
| Method Detail |
|---|
public void setValue(String name,
Object value)
Output
setValue in interface Outputname - The name of the valuevalue - The valuepublic String add(Object value)
Output
add in interface Outputpublic Object getValue(String name)
Output
getValue in interface Outputname - The name of the value
public void removeValue(String name)
Output
removeValue in interface Outputname - The name of the valuepublic boolean isEmpty()
Output
isEmpty in interface Outputpublic void setObject(Object bean)
Output
setObject in interface Outputbean - The bean (object) from where to get the properties.
public void setObject(Object bean,
String prefix)
Output
setObject in interface Outputbean - The bean (object) from where to get the properties.prefix - The prefix to use when placing the properties in the output.public Iterator<String> keys()
Output
keys in interface Outputpublic boolean has(String key)
Output
has in interface Output
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||