Package org.geotools.util
Interface Converter
-
public interface ConverterConverts values of one type into another.- Since:
- 2.4
- Author:
- Justin Deoliveira, The Open Planning Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> Tconvert(Object source, Class<T> target)Converts an object to an object of another type.
-
-
-
Method Detail
-
convert
<T> T convert(Object source, Class<T> target) throws Exception
Converts an object to an object of another type.If the conversion supplied is not supported, this method can either throw an exception or return
null.- Parameters:
source- The original object, nevernulltarget- The type of the converted object.- Returns:
- An instance of target, or
nullif the conversion could not take place. - Throws:
Exception- If the conversion can not take place.
-
-