{"provider_url":"https://hatena.blog","categories":["Scala"],"title":"Scala2.8\u306eMap\u3067apply\u3068\u304bimplicit\u3068\u304b","author_name":"yuichi_katahira","provider_name":"Hatena Blog","image_url":null,"version":"1.0","url":"https://katahirado.hatenablog.com/entry/20100812/1281629796","published":"2010-08-12 01:16:36","blog_url":"https://katahirado.hatenablog.com/","author_url":"https://blog.hatena.ne.jp/yuichi_katahira/","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkatahirado.hatenablog.com%2Fentry%2F20100812%2F1281629796\" title=\"Scala2.8\u306eMap\u3067apply\u3068\u304bimplicit\u3068\u304b - \u4ed9\u53f0 Ruby Vim JavaScript \u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30d7\u30ed\u30b0\u30e9\u30de\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u5099\u5fd8\u9332\u7684\u30e1\u30e2\u3002 Map(1->2,3->4)\u3092\u4e01\u5be7\u306b?\u8aad\u307f\u89e3\u304f\u3002\u81ea\u5206\u7406\u89e3\u306a\u306e\u3067\u7a81\u3063\u8fbc\u307f\u6b53\u8fce\u3002 //\u3053\u3046\u306f\u3067\u304d\u306a\u3044 scala> new Map(1->2,3->4) <console>:7: error: trait Map is abstract; cannot be instantiated new Map(1->2,3->4) ^ \u3053\u308c\u306f\u306a\u3093\u306a\u306e\u304b\u3002 //\u7b2c\u4e00\u6bb5\u968e scala> Map.apply(1->2,3->4) res24: scala.collection.immutable.Map[Int,Int] = Map(1 -> 2, 3 -> 4) \u3053\u3046\u306a\u308b\u3002object Map\u304c\u2026","type":"rich","height":"190","blog_title":"\u4ed9\u53f0 Ruby Vim JavaScript \u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30d7\u30ed\u30b0\u30e9\u30de"}