Class CollectionCastConverter<TargetElementType,SourceElementType extends TargetElementType,TargetCollectionType extends Collection<? extends TargetElementType>,SourceCollectionType extends Collection<? extends SourceElementType>>
java.lang.Object
com.saperion.common.lang.conversion.CollectionCastConverter<TargetElementType,SourceElementType,TargetCollectionType,SourceCollectionType>
- All Implemented Interfaces:
Converter<SourceCollectionType,
TargetCollectionType>
public class CollectionCastConverter<TargetElementType,SourceElementType extends TargetElementType,TargetCollectionType extends Collection<? extends TargetElementType>,SourceCollectionType extends Collection<? extends SourceElementType>>
extends Object
implements Converter<SourceCollectionType,TargetCollectionType>
Converts from SourceCollectionType to TargetCollectionType by using a cast.
- Author:
- jschwarz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert
(SourceCollectionType object) Converts the specified object and returns the conversion result.
-
Constructor Details
-
CollectionCastConverter
public CollectionCastConverter()
-
-
Method Details
-
convert
Description copied from interface:Converter
Converts the specified object and returns the conversion result. Implementations have to acceptnull
-values without throwing exceptions.- Specified by:
convert
in interfaceConverter<TargetElementType,
SourceElementType extends TargetElementType> - Parameters:
object
- object to convert- Returns:
- the converted object
-