mapstruct-plus icon indicating copy to clipboard operation
mapstruct-plus copied to clipboard

List 建议改为Collection

Open nestingLee opened this issue 7 months ago • 0 comments

public <S, T> List<T> convert(List<S> source, Class<T> targetType) {
    if (source == null || source.isEmpty()) {
        return new ArrayList<>();
    }
    return source.stream().map(item -> convert(item, targetType)).collect(Collectors.toList());
}

nestingLee avatar May 08 '25 02:05 nestingLee