{"author_url":"https://blog.hatena.ne.jp/crakac/","blog_url":"https://crakac.hatenablog.jp/","description":"Mutable\u306a\u3084\u3064 sort() sort()\u3092\u4f7f\u3046\u3068\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u81ea\u8eab\u304c\u30bd\u30fc\u30c8\u3055\u308c\u308b\u306e\u3067\u4f55\u3082\u8fd4\u3063\u3066\u3053\u306a\u3044\u70b9\u306b\u6ce8\u610f\u3002 val list = mutableListOf(5, 1, 3, 2, 4) list.sort() println(list) // [1, 2, 3, 4, 5] SortedSet\u3092\u4f7f\u3046 val set = sortedSetOf(5, 1, 3, 2, 4) println(set) // [1, 2, 3, 4, 5] Immutable\u306a\u3084\u3064 sorted()\u3092\u4f7f\u3046 \u30bd\u30fc\u30c8\u3055\u308c\u305f\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u304c\u8fd4\u3063\u3066\u304f\u308b\u3002 val array = listOf(5, 1, 3, 2\u2026","type":"rich","height":"190","categories":[],"blog_title":"Dive into Ofuton","provider_url":"https://hatena.blog","author_name":"crakac","width":"100%","title":"Kotlin\u3067Collection\u3092\u30bd\u30fc\u30c8\u3059\u308b\u3068\u304d\u306e\u30e1\u30e2","version":"1.0","url":"https://crakac.hatenablog.jp/entry/2020/10/22/211841","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcrakac.hatenablog.jp%2Fentry%2F2020%2F10%2F22%2F211841\" title=\"Kotlin\u3067Collection\u3092\u30bd\u30fc\u30c8\u3059\u308b\u3068\u304d\u306e\u30e1\u30e2 - Dive into Ofuton\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","image_url":null,"published":"2020-10-22 21:18:41"}