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.
Flyweight Pattern
한마디로
캐시
자바의 Integer 클래스가 일정한 개수만큼 캐싱해두는데 요거랑 비슷하다는 생각이 드네~
Note
일반적으로는 잘 사용하지 않을 것 같아. Enum 이 있는걸... 예시처럼 무거운 데이터를 매번 인스턴스화하고 싶지 않을 때에 사용할법한데, 지금까지 그런 케이스는 없었다..!