public static class Converters.Collection extends Object
Modifier and Type | Method and Description |
---|---|
static <S> Converters.ChainableConverter<Collection<S>,S> |
first()
Provides a helper method to create a collection converter that will get the first element of source collect and convert it.
|
static <S,D> Converter<Collection<S>,Collection<D>> |
map(Converters.Converter<S,D> elementConverter)
Provides a helper method to create a collection converter that will map each element based on the
elementConverter . |
public static <S,D> Converter<Collection<S>,Collection<D>> map(Converters.Converter<S,D> elementConverter)
elementConverter
.
using(Collection.map(String::toUpperCase)).map(); using(Collection.map(ele -> new Destination(ele)).map();
S
- the source element typeD
- the destination element typeelementConverter
- the converter to map the source element to destination elementpublic static <S> Converters.ChainableConverter<Collection<S>,S> first()
using(Collection.first().to(Destination.class).map();
S
- the source typeChainableConverter
Copyright © 2011–2024. All rights reserved.