Skip to content

Commit

Permalink
refactor: HobbyName 조회 메서드명 수정
Browse files Browse the repository at this point in the history
- 메서드의 기능을 더 잘 파악하기 위해 from 대신 findBy로 변경
  • Loading branch information
devholic22 committed Feb 23, 2024
1 parent 5ca32b2 commit 9dd50e9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public enum HobbyName {
public static List<HobbyName> findAllByNames(final List<String> names) {
validateNames(names);
return names.stream()
.map(HobbyName::from)
.map(HobbyName::findBy)
.toList();
}

Expand Down Expand Up @@ -86,7 +86,7 @@ private static void validateIsNotOverMaxSizeOfHobby(final List<String> names) {
}
}

private static HobbyName from(final String name) {
private static HobbyName findBy(final String name) {
return Arrays.stream(values())
.filter(hobbyName -> hobbyName.isSame(name))
.findFirst()
Expand Down

0 comments on commit 9dd50e9

Please sign in to comment.