Open
Conversation
2hwayoung
reviewed
Jan 6, 2025
| @@ -0,0 +1,34 @@ | |||
| package com.programmers.devcourse.view; | |||
2hwayoung
reviewed
Jan 6, 2025
|
|
||
| List<Map<String, Object>> rawMap = objectMapper.readValue(file, List.class); | ||
|
|
||
| for (Map<String, Object> stringObjectMap : rawMap) { |
2hwayoung
reviewed
Jan 6, 2025
| } | ||
| } | ||
|
|
||
| LinkedList<Map<String, Object>> list = new LinkedList<>(); |
Author
There was a problem hiding this comment.
요소를 맨앞에 추가해야할지 뒤에 추가해야할지 txt파일을 처음 다뤄봐서 고민했는데, ArrayList의 경우 첫번째 위치에 값을 추가하면 시간복잡도가 O(n)이라서 앞뒤추가 다 O(1)인 LinkedList로 처리했습니다~
2hwayoung
reviewed
Jan 6, 2025
| @@ -0,0 +1,20 @@ | |||
| package com.programmers.devcourse.model; | |||
|
|
|||
| public enum CommandType { | |||
2hwayoung
reviewed
Jan 6, 2025
| } | ||
|
|
||
| public long add(Saying saying) { | ||
| element.putIfAbsent(idx, saying); |
There was a problem hiding this comment.
전체적으로 Java 메서드 활용을 너무 잘하시는 것 같습니다! 배울 점이 많네요 ㅎㅎ
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.
완료
~ Lecture 10
리팩토링 할점