类 CollectionToStringConverter

java.lang.Object
cn.taketoday.core.conversion.support.CollectionToStringConverter
所有已实现的接口:
ConditionalConverter, ConditionalGenericConverter, GenericConverter

final class CollectionToStringConverter extends Object implements ConditionalGenericConverter
Converts a Collection to a comma-delimited String.
从以下版本开始:
3.0
作者:
Keith Donald
  • 字段详细资料

  • 构造器详细资料

    • CollectionToStringConverter

      public CollectionToStringConverter(ConversionService conversionService)
  • 方法详细资料

    • getConvertibleTypes

      public Set<GenericConverter.ConvertiblePair> getConvertibleTypes()
      从接口复制的说明: GenericConverter
      Return the source and target types that this converter can convert between.

      Each entry is a convertible source-to-target type pair.

      For conditional converters this method may return null to indicate all source-to-target pairs should be considered.

      指定者:
      getConvertibleTypes 在接口中 GenericConverter
    • matches

      public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType)
      从接口复制的说明: ConditionalConverter
      Should the conversion from sourceType to targetType currently under consideration be selected?
      指定者:
      matches 在接口中 ConditionalConverter
      参数:
      sourceType - the type descriptor of the field we are converting from
      targetType - the type descriptor of the field we are converting to
      返回:
      true if conversion should be performed, false otherwise
    • convert

      @Nullable public Object convert(@Nullable Object source, TypeDescriptor sourceType, TypeDescriptor targetType)
      从接口复制的说明: GenericConverter
      Convert the source object to the targetType described by the TypeDescriptor.
      指定者:
      convert 在接口中 GenericConverter
      参数:
      source - the source object to convert (may be null)
      sourceType - the type descriptor of the field we are converting from
      targetType - the type descriptor of the field we are converting to
      返回:
      the converted object