16 lines
507 B
Java
16 lines
507 B
Java
|
package com.plannaplan.responses.mappers;
|
||
|
|
||
|
import java.util.List;
|
||
|
import java.util.Objects;
|
||
|
import java.util.stream.Collectors;
|
||
|
|
||
|
import com.plannaplan.entities.User;
|
||
|
import com.plannaplan.responses.models.SearchForStudentsResponse;
|
||
|
|
||
|
public class UserResponseMappers {
|
||
|
public static List<SearchForStudentsResponse> mapToDefaultResponse(List<User> groups) {
|
||
|
return groups.stream().filter(Objects::nonNull).map(SearchForStudentsResponse::new)
|
||
|
.collect(Collectors.toList());
|
||
|
}
|
||
|
}
|