public final class TypeConverter extends Object
Modifier and Type | Method and Description |
---|---|
static <T,U> List<U> |
convert(List<T> toConvert,
Function<? super T,? extends U> converter)
Null-safely convert between two lists by applying a function to each value.
|
static <T1,T2,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 |
convert(T toConvert,
Function<? super T,? extends U> converter)
Null-safely convert between types by applying a function.
|
public static <T,U> U convert(T toConvert, Function<? super T,? extends U> converter)
public static <T,U> List<U> convert(List<T> toConvert, Function<? super T,? extends U> converter)
public 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)
Copyright © 2022. All rights reserved.