{"id":515,"date":"2021-09-17T15:22:52","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/swift.tecc0.com\/?p=515"},"modified":"2021-09-17T15:22:52","modified_gmt":"1970-01-01T00:00:00","slug":"post-515","status":"publish","type":"post","link":"https:\/\/swift.tecc0.com\/?p=515","title":{"rendered":"Swift\u3067\u30bb\u30c3\u30c8\u3092\u5b9a\u7fa9\u30fb\u5ba3\u8a00\u30fb\u521d\u671f\u5316\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>Swift2.0\u3088\u308a\u3001<strong>\u30bb\u30c3\u30c8(set)<\/strong>\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3002(Java\u306a\u3093\u304b\u306b\u3082\u3042\u308b\u306d<\/p>\n<p>\u65e5\u672c\u8a9e\u3067\u3044\u3046\u3068\u3001<strong>\u96c6\u5408<\/strong>\u3068\u3044\u3063\u305f\u610f\u5473\u5408\u3044\u3067\u3001\u914d\u5217\u3063\u307d\u3044\u3051\u3069<span style=\"color: #ff0000;\">\u91cd\u8907\u3092\u8a31\u3055\u305a\u3001\u9806\u756a\u304c\u4fdd\u8a3c\u3055\u308c\u306a\u3044\u3082\u306e<\/span>\u3060\u3068\u899a\u3048\u3066\u304a\u3053\u3046\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>Swift\u3067\u30bb\u30c3\u30c8\u3092\u5b9a\u7fa9\u30fb\u5ba3\u8a00\u30fb\u521d\u671f\u5316\u3059\u308b<\/h3>\n<pre class=\"lang:swift decode:true \">\/\/ \u578b\u3092\u660e\u793a\u3057\u305f\u5834\u5408\r\nlet someSet = Set&lt;String&gt;()\r\n\r\nlet countrySet = Set(arrayLiteral: \"USA\", \"Japan\")\r\nprint(countrySet) \/\/ [\"Japan\", \"USA\"]\r\n\r\nlet companySet = Set([\"Google\", \"Apple\"])\r\nprint(companySet) \/\/ [\"Google\", \"Apple\"]<\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u306b\u4f7f\u3048\u308b\u3088\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u57fa\u672c\u7684\u306b\u306f<strong>arrayLiteral<\/strong>\u3092\u4f7f\u3046\u3093\u3060\u3051\u3069\u3001\u914d\u5217\u3068\u6027\u8cea\u304c\u4f3c\u3066\u3044\u308b\u306e\u3067\u3001\u914d\u5217\u3092\u76f4\u63a5\u5909\u63db\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3088\u3002<\/p>\n<p>\u3053\u306e\u307e\u307e\u3067\u306f\u914d\u5217\u3068\u305d\u3093\u306a\u306b\u5909\u308f\u3089\u306a\u3044\u306e\u3067\u3001<strong>\u30bb\u30c3\u30c8\u306e\u7279\u5fb4<\/strong>\u306f\u6b21\u304b\u3089\u898b\u3066\u3044\u3053\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Swift2.0\u3088\u308a\u3001\u30bb\u30c3\u30c8(set)\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3002(Java\u306a\u3093\u304b\u306b\u3082\u3042\u308b\u306d \u65e5\u672c\u8a9e\u3067\u3044\u3046\u3068\u3001\u96c6\u5408\u3068\u3044\u3063\u305f\u610f\u5473\u5408\u3044\u3067\u3001\u914d\u5217\u3063\u307d\u3044\u3051\u3069\u91cd\u8907\u3092\u8a31\u3055\u305a\u3001\u9806\u756a\u304c\u4fdd\u8a3c\u3055\u308c\u306a\u3044\u3082\u306e\u3060\u3068\u899a\u3048\u3066\u304a\u3053\u3046\u3002 &nbsp; Swi&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/515"}],"collection":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=515"}],"version-history":[{"count":1,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/515\/revisions"}],"predecessor-version":[{"id":516,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/515\/revisions\/516"}],"wp:attachment":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}