Package com.bc.ceres.binding
Interface Converter<T>
- All Known Implementing Classes:
AffineTransformConverter
,ArrayConverter
,BooleanConverter
,BooleanExpressionConverter
,ByteConverter
,CharacterConverter
,ClassConverter
,ColorConverter
,CssColorConverter
,DateFormatConverter
,DoubleConverter
,EnumConverter
,FileConverter
,FloatConverter
,FontConverter
,GeneralExpressionConverter
,IntegerConverter
,IntervalConverter
,JavaTypeConverter
,JtsGeometryConverter
,LongConverter
,NumberConverter
,NumberFormatConverter
,PathConverter
,PatternConverter
,QuantizationOp.MapIntegerRangeConverter
,RectangleConverter
,ShortConverter
,StringConverter
,UrlConverter
public interface Converter<T>
A
Converter
provides a strategy to convert a value of a certain type from
plain text to a Java object and vice versa.- Since:
- 0.6
-
Method Summary
Modifier and TypeMethodDescriptionConverts a value of the type returned bygetValueType()
to its plain text representation.Gets the value type.Converts a value from its plain text representation to a Java object instance of the type returned bygetValueType()
.
-
Method Details
-
getValueType
Gets the value type.- Returns:
- The value type.
-
parse
Converts a value from its plain text representation to a Java object instance of the type returned bygetValueType()
.- Parameters:
text
- The textual representation of the value.- Returns:
- The converted value.
- Throws:
ConversionException
- If the conversion fails.
-
format
Converts a value of the type returned bygetValueType()
to its plain text representation.- Parameters:
value
- The value to be converted to text.- Returns:
- The textual representation of the value.
-