--- id: java-map title: "Java Map" category: "Programming_Language" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["Map interface", "μžλ°” λ§΅"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.88 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["java", "programming", "w3schools", "collections-framework", "map"] raw_sources: ["https://www.w3schools.com/java/java_map.asp"] applied_in: [] github_commit: "" --- # [[Java Map]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) The List/Set/Map comparison table reveals an asymmetric duplicate rule unique to Map β€” keys must be unique (like Set) but VALUES can duplicate freely (like List), meaning Map is the only structure of the three that enforces uniqueness on one part of its data while allowing duplication on the other. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **`Map` interface** β€” stores key-value pairs; keys unique, values can repeat. [S1] - **Implementing classes** β€” `HashMap` (fast, unordered), `TreeMap` (sorted by key), `LinkedHashMap` (insertion order). [S1] - **Core methods** β€” `put()` (add/update), `get()` (retrieve by key), `remove()`, `containsKey()`, `keySet()` (all keys as a Set). [S1] - **Three-way comparison** β€” List (duplicates yes, no key-value, ordered), Set (duplicates no, no key-value, unordered by default), Map (keys unique/values duplicate, key-value yes, unordered by default). [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - Method table: put() (add/update), get() (retrieve by key), remove() (delete by key), containsKey() (key existence check), keySet() (returns all keys). [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) μ†ŒμŠ€μ—μ„œ λͺ¨μˆœλ˜λŠ” μ •λ³΄λŠ” λ°œκ²¬λ˜μ§€ μ•ŠμŒ. ## πŸ› οΈ 적용 사둀 (Applied in summary) ν˜„μž¬ 발견된 μ‹€μ œ 적용 사둀가 μ—†μŠ΅λ‹ˆλ‹€ β€” μ‚¬μš©μž ID와 이름을 μ—°κ²°ν•˜λŠ” κ²ƒμ²˜λŸΌ 고유 킀에 값을 λ§€ν•‘ν•  λ•Œ Map이 ν‘œμ€€μ μœΌλ‘œ 쓰인닀. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) ν•΄λ‹Ή μ±•ν„°λŠ” κ°œλ…/λΉ„κ΅ν‘œ μ€‘μ‹¬μœΌλ‘œ 별도 μ‹€ν–‰ μ½”λ“œ μ˜ˆμ œκ°€ μ—†μŒ β€” λ‹€μŒ 챕터([[Java HashMap]])μ—μ„œ Map κ΅¬ν˜„μ²΄ μ‹€μŠ΅μ΄ μ‹œμž‘λœλ‹€. ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference, not a primary standards body) - **μ‹ λ’° 점수:** 0.88 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[Java Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[Java Set]], [[Java HashMap]], [[Java TreeMap]], [[Java LinkedHashMap]] - **μ°Έμ‘° λ§₯락:** Map μΈν„°νŽ˜μ΄μŠ€μ˜ 기초 β€” HashMap/TreeMap/LinkedHashMap κ΅¬ν˜„μ²΄ μ±•ν„°λ‘œ 이어짐. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” Java Map Interface β€” https://www.w3schools.com/java/java_map.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "Java Map Interface" page (Astra wiki-curation, P-Reinforce v3.1 format).