{"author_url":"https://blog.hatena.ne.jp/sys1yagi/","height":"190","blog_title":"visible true","image_url":null,"url":"https://sys1yagi.hatenablog.com/entry/2016/05/18/170745","author_name":"sys1yagi","categories":["Kotlin","Android"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsys1yagi.hatenablog.com%2Fentry%2F2016%2F05%2F18%2F170745\" title=\"Kotlin Tips: Reified Type Parameters\u3067\u578b\u30c1\u30a7\u30c3\u30af\u3092\u6c4e\u7528\u5316\u3059\u308b - visible true\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2016-05-18 17:07:45","type":"rich","title":"Kotlin Tips: Reified Type Parameters\u3067\u578b\u30c1\u30a7\u30c3\u30af\u3092\u6c4e\u7528\u5316\u3059\u308b","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","width":"100%","version":"1.0","blog_url":"https://sys1yagi.hatenablog.com/","description":"\u554f\u984c Kotlin Tips : Intent\u306b\u5fc5\u8981\u306a\u5024\u304c\u5165\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u4f8b\u5916\u3092\u30b9\u30ed\u30fc\u3057\u305f\u3044 - visible true\u3067\u306fgetLongOrThrow()\u3092Intent\u306b\u8ffd\u52a0\u3057lazy\u3092\u4f7f\u3046\u4e8b\u3067\u53ef\u8aad\u6027\u3092\u9ad8\u3081\u305f\u3002 Intent.getIntOrThrow(key: String)\u306e\u304a\u3055\u3089\u3044 fun Intent.getIntOrThrow(key: String): Int = this.extras.get(key).let { if (it !is Int) { throw IllegalArgumentException(\"Extras don't have Int value spe\u2026"}