java.lang.Object
org.scopemvc.util.convertor.NullStringConvertor
org.scopemvc.util.convertor.StringStringConvertor
- All Implemented Interfaces:
- StringConvertor
- public final class StringStringConvertor
- extends NullStringConvertor
String convertor for type java.lang.String.
The main sense of the class is to correctly handle null value.
Useful results can be obtained if null representation
is set for example to "(null)" or "N/A" - this
strings are then parsed into null value.
- Version:
- $Revision: 1.2 $ $Date: 2002/01/12 09:35:41 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringStringConvertor
public StringStringConvertor()
valueAsString
public java.lang.String valueAsString(java.lang.Object inValue)
throws java.lang.IllegalArgumentException
- Converts String to String.
Handling of null value: it is converted
into getNullAsString() 55 which is default
empty String.
stringAsValue
public java.lang.Object stringAsValue(java.lang.String inString)
throws java.lang.IllegalArgumentException
- Parses String to String. If passed String is non-null and non-empty,
the same instance is returned.
Handling of null value is based on the following
sequence of conditions:
- for empty input string also empty String is returned.
- for input equal to value of getNullAsString() 55
null is returned.