Package com.gengoai.conversion
Class MapTypeConverter
- java.lang.Object
-
- com.gengoai.conversion.MapTypeConverter
-
- All Implemented Interfaces:
TypeConverter
- Direct Known Subclasses:
ConcurrentMapTypeConverter
,ConcurrentSkipListMapTypeConverter
,HashMapTypeConverter
,LinkedHashMapTypeConverter
,TreeMapTypeConverter
,WeakHashMapTypeConverter
public abstract class MapTypeConverter extends Object implements TypeConverter
Base Map type converter. Handles Maps, JsonEntries, CharSequences, and other objects that can be iterated over.- Author:
- David B. Bracewell
-
-
Constructor Summary
Constructors Constructor Description MapTypeConverter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Object
convert(Object source, Type... parameters)
Converts an object from one type to another.abstract Map<?,?>
createMap()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.gengoai.conversion.TypeConverter
getConversionType
-
-
-
-
Method Detail
-
convert
public Object convert(Object source, Type... parameters) throws TypeConversionException
Description copied from interface:TypeConverter
Converts an object from one type to another.- Specified by:
convert
in interfaceTypeConverter
- Parameters:
source
- the source objectparameters
- the optional type parameters when using Generics.- Returns:
- the converted object
- Throws:
TypeConversionException
- the source object was not able to be converted to the target type
-
createMap
public abstract Map<?,?> createMap()
-
-