First, creates a new Collection of the requested targetType with a size equal to the size of the source Collection. Then copies each element in the source collection to the target collection. Will perform an element conversion from the source collection's parameterized type to the target collection's parameterized type if necessary.
| Modifier and Type | Field and Description |
|---|---|
| private final ConversionService |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | convert(Object
the source object to convert (may be source, TypeDescriptor null)the type descriptor of the field we are converting from sourceType, TypeDescriptor the type descriptor of the field we are converting to targetType)Implements org. TypeDescriptor.
|
| public Set | getConvertibleTypes()
Implements org. |
| public boolean | matches(TypeDescriptor
the type descriptor of the field we are converting from sourceType, TypeDescriptor the type descriptor of the field we are converting to targetType)Implements org. sourceType to targetType currently under
consideration be selected?
|
| conversionService | back to summary |
|---|---|
| private final ConversionService conversionService | |
| CollectionToCollectionConverter | back to summary |
|---|---|
| public CollectionToCollectionConverter(ConversionService conversionService) | |
| convert | back to summary |
|---|---|
| public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) Implements org. Doc from org. Convert the source object to the targetType described by the
| |
| getConvertibleTypes | back to summary |
|---|---|
| public Set Implements org. Doc from org. Return the source and target types that this converter can convert between. Each entry is a convertible source-to-target type pair. For
| |
| matches | back to summary |
|---|---|
| public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) Implements org. Doc from org. Should the conversion from
| |