javadoc
This commit is contained in:
parent
5ce16e01eb
commit
8d4b9c0810
|
|
@ -25,8 +25,9 @@ import org.springframework.core.convert.converter.GenericConverter;
|
|||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* Converts from a source array to a target array type.
|
||||
*
|
||||
* Converts an Array to another Array.
|
||||
* First adapts the source array to a List, then delegates to {@link CollectionToArrayConverter} to perform the target array conversion.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -30,8 +30,11 @@ import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
|||
import org.springframework.core.convert.converter.GenericConverter;
|
||||
|
||||
/**
|
||||
* Converts from an array to a collection.
|
||||
*
|
||||
* Converts an Array to a Collection.
|
||||
* First, creates a new Collection of the requested targetType.
|
||||
* Then adds each array element to the target collection.
|
||||
* Will perform an element conversion from the source component type to the collection's parameterized type if necessary.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -26,8 +26,9 @@ import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
|||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* Converts from an array to a Map.
|
||||
*
|
||||
* Converts an Array to a Map.
|
||||
* First adapts the source Array to a List, then delegates to {@link CollectionToMapConverter} to perform the target Map conversion.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -25,8 +25,9 @@ import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
|||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* Converts from an array to a single Object.
|
||||
*
|
||||
* Converts an Array to an Object by returning the first array element after converting it to the desired targetType.
|
||||
* This implementation first adapts the source Array to a List, then delegates to {@link CollectionToObjectConverter} to perform the target Object conversion.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -25,8 +25,9 @@ import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
|||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* Converts from an array to a String.
|
||||
*
|
||||
* Converts an Array to a comma-delimited String.
|
||||
* This implementation first adapts the source Array to a List, then delegates to {@link CollectionToStringConverter} to perform the target String conversion.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -31,8 +31,11 @@ import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
|||
import org.springframework.core.convert.converter.GenericConverter;
|
||||
|
||||
/**
|
||||
* Converts from a Collection to an array.
|
||||
*
|
||||
* Converts a Collection to an Array.
|
||||
* First, creates a new Array of the requested targetType with a length equal to the size of the source Collection.
|
||||
* Then sets collection element into the array.
|
||||
* Will perform an element conversion from the collection's parameterized type to the array's component type if necessary.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -28,7 +28,10 @@ import org.springframework.core.convert.converter.GenericConverter;
|
|||
import static org.springframework.core.convert.support.ConversionUtils.*;
|
||||
|
||||
/**
|
||||
* Converts from a source Collection to target Collection type.
|
||||
* Converts from a Collection to another Collection.
|
||||
* 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.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
|
|
|
|||
|
|
@ -28,7 +28,12 @@ import org.springframework.core.convert.TypeDescriptor;
|
|||
import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
||||
|
||||
/**
|
||||
* Converts from a Collection to a Map.
|
||||
* Converts a Collection to a Map.
|
||||
* First, creates a new Map 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 map.
|
||||
* During the copy process, if an element is a String, that String is treated as a "key=value" pair, parsed, and a corresponding entry is created in the target map.
|
||||
* If an element is another Object type, an entry is created in the targetMap with this Object as both the key and value.
|
||||
* Will perform an element conversion from the source collection's parameterized type to the target map's parameterized K,V types if necessary.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
|||
import org.springframework.core.convert.converter.GenericConverter;
|
||||
|
||||
/**
|
||||
* Converts from a Collection to a single Object.
|
||||
* Converts a Collection to an Object by returning the first collection element after converting it to the desired targetType.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
|||
import org.springframework.core.convert.converter.GenericConverter;
|
||||
|
||||
/**
|
||||
* Converts from a Collection to a String.
|
||||
* Converts a Collection to a comma-delimited String.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
|
|
|
|||
Loading…
Reference in New Issue