Skip to content

Commit

Permalink
리뷰내용 적용 - SeatGradeFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
pollra committed Sep 24, 2023
1 parent 8e69118 commit 18e5b33
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
public class SeatGradeFactory {
public List<RemainingSeatCountResponse> toRemainingSeatCountResponses(List<SeatGrade> seatGrades) {
return seatGrades.stream()
.map(this::toRemainingSeatCountResponse)
.map(seatGrade -> {
return new RemainingSeatCountResponse(seatGrade.getId(), seatGrade.getName(),
seatGrade.getRemainingSeatCount());
})
.toList();
}

private RemainingSeatCountResponse toRemainingSeatCountResponse(SeatGrade seatGrade) {
return new RemainingSeatCountResponse(seatGrade.getId(), seatGrade.getName(),
seatGrade.getRemainingSeatCount());
}
}

0 comments on commit 18e5b33

Please sign in to comment.