Class SetConverter<S,T>

java.lang.Object
org.springframework.data.redis.connection.convert.SetConverter<S,T>
Type Parameters:
S - The type of elements in the Set to convert
T - The type of elements in the converted Set
All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<Set<S>,Set<T>>

public class SetConverter<S,T> extends Object implements org.springframework.core.convert.converter.Converter<Set<S>,Set<T>>
Converts a Set of values of one type to a Set of values of another type preserving item order.
Author:
Jennifer Hickey, Christoph Strobl
  • Constructor Details

    • SetConverter

      public SetConverter(org.springframework.core.convert.converter.Converter<S,T> itemConverter)
      Parameters:
      itemConverter - The Converter to use for converting individual Set items. Must not be null.
  • Method Details

    • convert

      public Set<T> convert(Set<S> source)
      Specified by:
      convert in interface org.springframework.core.convert.converter.Converter<S,T>
    • convert

      public Set<T> convert(Collection<S> source)