org.araneaframework.uilib.list.util
Interface Converter

All Known Implementing Classes:
BooleanToLongConverter, BooleanToStringConverter, DummyConverter, NullConverter, ReverseConverter

public interface Converter

Data converter between source and destination types.


Method Summary
 Object convert(Object data)
          Converts data from source type into destination type.
 Class getDestinationType()
          Returns the destination data type.
 Class getSourceType()
          Returns the source data type.
 Object reverseConvert(Object data)
          Converts data from destination type into source type.
 

Method Detail

convert

public Object convert(Object data)
               throws ConversionException
Converts data from source type into destination type.

Parameters:
data - Source typed data.
Returns:
Destination typed data.
Throws:
ConversionException - when convertion fails.

reverseConvert

public Object reverseConvert(Object data)
                      throws ConversionException
Converts data from destination type into source type.

Parameters:
data - Destination typed data.
Returns:
Source typed data.
Throws:
ConversionException - when convertion fails.

getSourceType

public Class getSourceType()
Returns the source data type.

Returns:
the source data type.

getDestinationType

public Class getDestinationType()
Returns the destination data type.

Returns:
the destination data type.