Java Assignment3 upload by Son young jun#25
Open
sohn919 wants to merge 2 commits intoFastCampusKDTBackend:mainfrom
Open
Java Assignment3 upload by Son young jun#25sohn919 wants to merge 2 commits intoFastCampusKDTBackend:mainfrom
sohn919 wants to merge 2 commits intoFastCampusKDTBackend:mainfrom
Conversation
ecsimsw
approved these changes
Apr 21, 2023
| private String dateOfMade; | ||
| private AuthMethod[] authMethod; | ||
|
|
||
| Electronic() { |
Author
There was a problem hiding this comment.
이건 제가 깜빡하고 접근 제어자를 지정하지 않은 것 같습니다.
| @Override | ||
| public int hashCode() { | ||
| int result = Objects.hash(userId, userPassword, userPhoneNumber, userEmail, userBirthDate, registerTime); | ||
| result = 31 * result + Arrays.hashCode(electronicDevices); |
| private static Users instance = null; | ||
|
|
||
| private Users(){ | ||
| }; |
| for(Electronic electronic : electronicList) { | ||
| for(AuthMethod auth : electronic.getAuthMethod()) { | ||
| if(auth == authMethod) | ||
| arr.add(electronic); |
Member
There was a problem hiding this comment.
이미 추가된 electronic의 경우 그 다음 authMethod를 보지 않아도 되겠네요.
맞나요? ㅎㅎ
for(Electronic electronic : electronicList) {
for(AuthMethod auth : electronic.getAuthMethod()) {
if(auth == authMethod) {
arr.add(electronic);
break;
}
}
}
ecsimsw
approved these changes
Apr 21, 2023
| } | ||
|
|
||
| public User(String userId, String userPassword, String userPhoneNumber, String userEmail, String userBirthDate, Electronic[] electronicDevices) { | ||
| this(); |
Member
There was a problem hiding this comment.
오오 리뷰 중에 this()로 생성자 로직 중복을 막은 첫 코드네요.
잘하셨습니다.
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.
Practice03 에서 groupByAuthMethod() 리뷰 부탁드립니다.
이중 for문 말고 더 좋은 형태가 있을까요?