KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jodd > bean > Converter


1 package jodd.bean;
2
3 /**
4  * Object converter interface
5  *
6  * @see ConvertersManager
7  */

8 public interface Converter {
9
10     /**
11      * Converts object received as parameter into object of another class.
12      * For example, in a IntegerConverter implementation of this interface,
13      * this method should convert all objects into Integer object. Conversion has
14      * to be done correctly, with investigation of given object.
15      * <p>
16      *
17      * If conversion is not possible, and <code>IllegalParameterException</code>
18      * should be thrown.
19      *
20      * @param obj object to convert from
21      *
22      * @return resulting object
23      */

24     public Object convert(Object obj);
25
26 }
27
Popular Tags