{"id":888,"date":"2025-09-01T14:14:36","date_gmt":"2025-09-01T14:14:36","guid":{"rendered":"https:\/\/nurlandroid.com\/?p=888"},"modified":"2025-09-01T14:14:37","modified_gmt":"2025-09-01T14:14:37","slug":"%d0%be%d1%81%d0%bd%d0%be%d0%b2%d0%bd%d1%8b%d0%b5-%d0%b8%d0%bd%d1%82%d0%b5%d1%80%d1%84%d0%b5%d0%b9%d1%81%d1%8b-%d0%ba%d0%be%d0%bb%d0%bb%d0%b5%d0%ba%d1%86%d0%b8%d0%b9-%d0%b2-kotlin-%d0%b5","status":"publish","type":"post","link":"https:\/\/nurlandroid.com\/?p=888","title":{"rendered":"\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u0432 Kotlin-\u0435"},"content":{"rendered":"\n<p>\u0412 Kotlin (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 JVM-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Android), \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0441\u0442\u0440\u043e\u044f\u0442\u0441\u044f <strong>\u043f\u043e\u0432\u0435\u0440\u0445 Java Collection Framework<\/strong>, \u043d\u043e Kotlin \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 <strong>\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f, \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c<\/strong>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u0432 Kotlin<\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/th><th>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/th><th>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/th><\/tr><\/thead><tbody><tr><td><code>Collection&lt;T&gt;<\/code><\/td><td>\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439<\/td><td><code>List<\/code>, <code>Set<\/code>, <code>MutableList<\/code><\/td><\/tr><tr><td><code>List&lt;T&gt;<\/code><\/td><td>\u0423\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443<\/td><td><code>listOf(1, 2, 3)<\/code><\/td><\/tr><tr><td><code>Set&lt;T&gt;<\/code><\/td><td>\u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0435\u0437 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e)<\/td><td><code>setOf(\"a\", \"b\")<\/code><\/td><\/tr><tr><td><code>Map&lt;K, V&gt;<\/code><\/td><td>\u041f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/td><td><code>mapOf(\"a\" to 1)<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u0418\u0445 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438:<\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/th><th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th><th>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f<\/th><\/tr><\/thead><tbody><tr><td><code>MutableCollection&lt;T&gt;<\/code><\/td><td>\u0420\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 <code>Collection&lt;T&gt;<\/code> \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438<\/td><td>\u2014<\/td><\/tr><tr><td><code>MutableList&lt;T&gt;<\/code><\/td><td>\u0421\u043f\u0438\u0441\u043e\u043a \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b<\/td><td><code>mutableListOf(1, 2)<\/code><\/td><\/tr><tr><td><code>MutableSet&lt;T&gt;<\/code><\/td><td>\u041c\u0443\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e<\/td><td><code>mutableSetOf(\"a\", \"b\")<\/code><\/td><\/tr><tr><td><code>MutableMap&lt;K, V&gt;<\/code><\/td><td>\u041c\u0443\u0442\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u043c\u0430\u043f\u0430<\/td><td><code>mutableMapOf(\"a\" to 1)<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Iterable&lt;T><\/h4>\n\n\n\n<p>\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>iterator(): Iterator&lt;T><\/code><\/li>\n\n\n\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 <code>for (item in collection)<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><code>Collection&lt;T&gt;<\/code><\/h4>\n\n\n\n<p>\u041d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 <code>Iterable<\/code>, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>size<\/code>, <code>contains()<\/code>, <code>isEmpty()<\/code>, <code>containsAll()<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">List&lt;T><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0443\u0431\u043b\u0438<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0414\u043e\u0441\u0442\u0443\u043f \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443: <code>list[0]<\/code><\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Set&lt;T><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0411\u0435\u0437 \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432 (<code>equals()<\/code> \u0438 <code>hashCode()<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c)<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: <code>LinkedHashSet<\/code> (\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u0441\u0442\u0430\u0432\u043a\u0438)<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0415\u0441\u0442\u044c <code>HashSet<\/code>, <code>SortedSet<\/code>, <code>TreeSet<\/code> (Java)<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Map&lt;K, V><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041a\u043b\u044e\u0447\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041c\u0435\u0442\u043e\u0434\u044b: <code>get(key)<\/code>, <code>keys<\/code>, <code>values<\/code>, <code>entries<\/code><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 Kotlin (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 JVM-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Android), \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0441\u0442\u0440\u043e\u044f\u0442\u0441\u044f \u043f\u043e\u0432\u0435\u0440\u0445 Java Collection Framework, \u043d\u043e Kotlin \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f, \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u0432 Kotlin \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Collection&lt;T&gt; \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 List, Set, MutableList List&lt;T&gt; \u0423\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 listOf(1, 2, 3) Set&lt;T&gt; \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,31],"tags":[],"class_list":["post-888","post","type-post","status-publish","format-standard","hentry","category-kotlin","category-questions"],"_links":{"self":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts\/888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=888"}],"version-history":[{"count":1,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts\/888\/revisions"}],"predecessor-version":[{"id":890,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=\/wp\/v2\/posts\/888\/revisions\/890"}],"wp:attachment":[{"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nurlandroid.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}