|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Specifies contract for all classes converting object values to String
representation and back from String
into object instances.
Convertors should be based on Locale
.
Default StringConvertor
s can be obtained with class StringConvertors
.
StringConvertors
Method Summary | |
java.lang.Object |
stringAsValue(java.lang.String inString)
Parses String to produce corresponding object. |
java.lang.String |
valueAsString(java.lang.Object inValue)
Formats object into String . |
Method Detail |
public java.lang.String valueAsString(java.lang.Object inValue) throws java.lang.IllegalArgumentException
String
. It never return a null.
Implementing class can offer posibility to set string representation of
null
(such as "null"
or ""
),
however default representation should be ""
. Slightly
different null handling is performed in StringStringConvertor
class.
inValue
- TODO: Describe the Parameter
java.lang.IllegalArgumentException
- this convertor can't express the
value as String.public java.lang.Object stringAsValue(java.lang.String inString) throws java.lang.IllegalArgumentException
String
to produce corresponding object. Empty or
null
string will be typically converted into null
(unlike standard java.text
formats which throws exceptions
in such situations).
inString
- TODO: Describe the Parameter
java.lang.IllegalArgumentException
- can't convert from String.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |