Open
Conversation
parksangchu
reviewed
Dec 14, 2023
| + "네 | 아니오%n"), | ||
| RESULT("%n페어 매칭 결과입니다.%n"), | ||
| RESULT_DELIMITER(" : "), | ||
| RESET("%n초기화 되었습니다.%n"); |
There was a problem hiding this comment.
추후에 확장성을 위해서 기능들을 하드 코딩하지 않고 매개값으로 가져와서 출력하는 방법도 고민해보시면 좋을거 같습니다!
| if (option.equals(OptionCommand.RESET.getCommand())) { | ||
| reset(); | ||
| } | ||
| if (option.equals(OptionCommand.QUIT.getCommand())) { |
There was a problem hiding this comment.
이부분을 메서드로 만들면 더 깔끔할거 같아요! ex) OptionCommand.isQuit()
| while (true) { | ||
| matchingConditions = readConditions(); | ||
| if (matchingService.hasConditions(matchingConditions)) { | ||
| break; |
There was a problem hiding this comment.
이 부분에서 이미 매칭이 있어 break가 되면 반복문을 벗어나게 되어서 아래 리매칭을 묻는 부분이 진행이 안되지 않나요???
|
|
||
| public Pairs findPairs(MatchingConditions matchingConditions) { | ||
| return matchingRepository.search(matchingConditions); | ||
| } |
| } | ||
|
|
||
| public void reset() { | ||
| matchingRepository = new ArrayList<>(); |
There was a problem hiding this comment.
clear() 를 함으로써 메모리 낭비를 줄이시는건 어떠실까요!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.