Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.scopemvc.util.convertor
Interface StringConvertor  view StringConvertor download StringConvertor.java

All Known Implementing Classes:
NullStringConvertor

public interface StringConvertor

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 StringConvertors can be obtained with class StringConvertors.

Version:
$Revision: 1.3 $ $Date: 2002/01/19 13:01:05 $

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

valueAsString

public java.lang.String valueAsString(java.lang.Object inValue)
                               throws java.lang.IllegalArgumentException
Formats object into 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.


stringAsValue

public java.lang.Object stringAsValue(java.lang.String inString)
                               throws java.lang.IllegalArgumentException
Parses 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).