Package org.apache.ofbiz.base.conversion
Class CollectionConverters.ArrayToList<T>
- java.lang.Object
-
- org.apache.ofbiz.base.conversion.AbstractConverter<T[],java.util.List<T>>
-
- org.apache.ofbiz.base.conversion.CollectionConverters.ArrayToList<T>
-
- All Implemented Interfaces:
Converter<T[],java.util.List<T>>
,ConverterLoader
- Enclosing class:
- CollectionConverters
public static class CollectionConverters.ArrayToList<T> extends AbstractConverter<T[],java.util.List<T>>
-
-
Constructor Summary
Constructors Constructor Description ArrayToList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canConvert(java.lang.Class<?> sourceClass, java.lang.Class<?> targetClass)
Returnstrue
if this object can convertsourceClass
totargetClass
.java.util.List<T>
convert(T[] obj)
Convertsobj
toT
.-
Methods inherited from class org.apache.ofbiz.base.conversion.AbstractConverter
convert, getSourceClass, getTargetClass, loadConverters
-
-
-
-
Method Detail
-
canConvert
public boolean canConvert(java.lang.Class<?> sourceClass, java.lang.Class<?> targetClass)
Description copied from interface:Converter
Returnstrue
if this object can convertsourceClass
totargetClass
.Implementations can accomodate class hierarchy ranges by converting super classes or interfaces.
- Specified by:
canConvert
in interfaceConverter<T[],java.util.List<T>>
- Overrides:
canConvert
in classAbstractConverter<T[],java.util.List<T>>
- Parameters:
sourceClass
- The sourceClass
targetClass
- The targetClass
- Returns:
true
if this object can convertsourceClass
totargetClass
.
-
convert
public java.util.List<T> convert(T[] obj) throws ConversionException
Description copied from interface:Converter
Convertsobj
toT
.- Parameters:
obj
- The sourceObject
to convert- Returns:
- The converted
Object
- Throws:
ConversionException
-
-