|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.fdsapi.ConverterBase
|
+--com.fdsapi.ConverterMapValue
This class looks for the Object passed to the convert method in a HashMap and replaces this key with the associated value in the Map (if key then replace with value). Note both key and value can be ANY Object type or null.
Sample call:
Map map=new HashMap();
map.put(null," ");
map.put(""," ");
map.put(new Boolean(true),"yes");
map.put(new Boolean(false),"no");
Converter converter=new ConverterMapValue(map);// default DateFormat including short date and time
Object output=converter.convert(null); // returns " "
...
| Constructor Summary | |
ConverterMapValue(java.util.Map map)
Constructor that takes the map that the convert method uses to see what keys to replace with what value |
|
ConverterMapValue(java.util.Map map,
Converter nextConverter)
Constructor that takes the map that the convert method uses to see what keys to replace with what values as well as the next Converter in the decorator chain. |
|
| Method Summary | |
java.lang.Object |
convert(java.lang.Object inputObj)
|
protected Converter |
createInstance(Converter nextConverter)
Method that works like clone in that it returns a usable copy of the this Object |
| Methods inherited from class com.fdsapi.ConverterBase |
createInstance, decoratorConvert |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ConverterMapValue(java.util.Map map)
public ConverterMapValue(java.util.Map map,
Converter nextConverter)
| Method Detail |
public java.lang.Object convert(java.lang.Object inputObj)
protected Converter createInstance(Converter nextConverter)
createInstance in class ConverterBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||