Moved CoursesResponse To Abstract
This commit is contained in:
@ -5,10 +5,10 @@ import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.plannaplan.entities.Course;
|
||||
import com.plannaplan.responses.models.CoursesResponse;
|
||||
import com.plannaplan.responses.models.GetCoursesResponse;
|
||||
|
||||
public class CoursesResponseMappers {
|
||||
public static final List<CoursesResponse> mapCoursesListToCoursesResponseList(List<Course> courses) {
|
||||
return courses.stream().filter(Objects::nonNull).map(CoursesResponse::new).collect(Collectors.toList());
|
||||
public static final List<GetCoursesResponse> mapCoursesListToCoursesResponseList(List<Course> courses) {
|
||||
return courses.stream().filter(Objects::nonNull).map(GetCoursesResponse::new).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user