Class TypeConverter
java.lang.Object
software.amazon.awssdk.core.runtime.TypeConverter
A utilities class used by generated clients to easily convert between nested types, such as lists and maps.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,U> List <U> Null-safely convert between two lists by applying a function to each value.static <T1,T2, U1, U2>
Map<U1, U2> convert(Map<T1, T2> toConvert, Function<? super T1, ? extends U1> keyConverter, Function<? super T2, ? extends U2> valueConverter, BiPredicate<U1, U2> resultFilter) Null-safely convert between two maps by applying a function to each key and value.static <T,U> U Null-safely convert between types by applying a function.
-
Method Details
-
convert
Null-safely convert between types by applying a function. -
convert
-
convert
public static <T1,T2, Map<U1,U1, U2> U2> convert(Map<T1, T2> toConvert, Function<? super T1, ? extends U1> keyConverter, Function<? super T2, ? extends U2> valueConverter, BiPredicate<U1, U2> resultFilter) Null-safely convert between two maps by applying a function to each key and value. A predicate is also specified to filter the results, in case the mapping function were to generate duplicate keys, etc.
-