{"id":278539,"date":"2016-04-18T21:25:03","date_gmt":"2016-04-18T17:25:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=278539"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=278539","title":{"rendered":"\u0428\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0430 Java \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 7.2 \u0422\u0438\u043f\u043e\u0432\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438: \u041e\u0431\u0445\u043e\u0434 Map&#8217;\u044b, \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438"},"content":{"rendered":"\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/447\/ad7\/e70\/447ad7e7084749cc99e04cac26210807.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0445\u043e\u0431\u0431\u0438: \u044f \u0441\u043e\u0431\u0438\u0440\u0430\u044e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0432 Java, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0436\u0443 \u0432 \u0438\u043d\u0435\u0442\u0435, \u0438 \u043f\u044b\u0442\u0430\u044e\u0441\u044c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443\/\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438\/\u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0430\u043a\u0443\u044e \u0442\u0438\u043f\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430 Java \u043a\u0430\u043a &quot;\u043e\u0431\u0445\u043e\u0434 Map&#8217;\u044b&quot; \u0438 \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0441\u0442\u0440\u043e\u043a, \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0435\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u0432\u043a\u043b\u044e\u0447\u0430\u044f &quot;\u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435&quot; \u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c) \u0438 \u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. <\/p>\n<p>  <\/p>\n<p>\u0410\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 Stackoverflow: <a href=\"http:\/\/stackoverflow.com\/questions\/46898\/how-to-efficiently-iterate-over-each-entry-in-a-map\/35558955#35558955\">\u043f\u043e \u043e\u0431\u0445\u043e\u0434\u0443 map&#8217;\u044b<\/a> \u0438 <a href=\"http:\/\/stackoverflow.com\/questions\/275944\/how-do-i-count-the-number-of-occurrences-of-a-char-in-a-string\/35242882#35242882\">\u043f\u043e \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0443 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a<\/a>.<br \/>  \u0422\u0430\u043a \u0436\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043c\u043e\u0439 opensource \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/Vedenin\/useful-java-links\/tree\/master\/link-rus\">useful-java-links<\/a> \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u0430\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 Java \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432. <\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0431\u0449\u0435\u0435 \u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435 &#39;\u0428\u043f\u0430\u0440\u0433\u0430\u043b\u043e\u043a&#39;<\/b><\/p>\n<div class=\"spoiler_text\">\n<p><a href=\"https:\/\/habrahabr.ru\/post\/265061\/\">1. JPA \u0438 Hibernate \u0432 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445 \u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u0445<\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/post\/266821\/\">2. \u0422\u0440\u0438\u0441\u0442\u0430 \u043f\u044f\u0442\u044c\u0434\u0435\u0441\u044f\u0442 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043d\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 Java opensource \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 github <\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/luxoft\/blog\/256877\/\">3. \u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0432 Java (\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435, guava, apache, trove, gs-collections \u0438 \u0434\u0440\u0443\u0433\u0438\u0435) <\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/luxoft\/blog\/270383\/\">4. Java Stream API<\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/luxoft\/blog\/272025\/\">5. \u0414\u0432\u0435\u0441\u0442\u0438 \u043f\u044f\u0442\u044c\u0434\u0435\u0441\u044f\u0442 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0432\u0438\u0434\u0435\u043e \u0434\u043e\u043a\u043b\u0430\u0434\u043e\u0432 \u0438 \u043b\u0435\u043a\u0446\u0438\u0439 \u043e Java<\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/luxoft\/blog\/280784\/\">6. \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u0434\u043b\u044f Java \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430<\/a><br \/>  7 \u0422\u0438\u043f\u043e\u0432\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<br \/>  &nbsp;&nbsp;<a href=\"https:\/\/habrahabr.ru\/post\/278233\/\"> 7.1 \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f InputStream \u0432 \u0441\u0442\u0440\u043e\u043a\u0443<\/a><br \/>  &nbsp;&nbsp;<a href=\"https:\/\/habrahabr.ru\/post\/278313\/\"> 7.2 \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u0445\u043e\u0434\u0430 Map&#8217;\u044b, \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438<\/a><\/p>\n<\/div>\n<\/div>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h3>1. \u041e\u0431\u0445\u043e\u0434 Map&#8217;\u044b<\/h3>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0435\u0441\u043b\u0438 \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043d\u0430\u0439\u0434\u0435\u0442\u0441\u044f \u0441 \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0431\u0445\u043e\u0434 map&#8217;\u044b \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u044b \u0438 \u043a\u043b\u044e\u0447\u0438 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u0431\u0445\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0439 \u0438\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e). \u0427\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u0430\u0445\u0430\u0440\u043e\u043c, \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0435. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043a\u0430\u043a\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 \u0438 \u043a\u0430\u043a\u0438\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0434\u0430\u0432\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043d\u043e \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u043f\u0443\u0433\u0430\u044f\u0445.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0445\u043e\u0434 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 Map, \u043d\u043e \u0438 \u0438\u0445 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432 \u0438\u0437 <strong>IterableMap<\/strong> \u0438\u0437 <code>Apache Collections<\/code> \u0438 <strong>MutableMap<\/strong> of <code>Eclipse (CS) collections<\/code>. <\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b: <\/p>\n<p>  <\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u0443\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 Map&#8217;\u0430 \u0447\u0438\u0441\u0435\u043b, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u0432\u0441\u0435\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0443 \u044d\u0442\u043e\u0439 Map&#8217;\u044b. \u0422\u0430\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0430, \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043c \u0447\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 Java \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430. <\/p>\n<p>  <\/p>\n<ol>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>iterator<\/strong>, <strong>Map.Entry<\/strong> \u0438 \u0446\u0438\u043a\u043b while. \u041d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043f\u043e \u0441\u0443\u0442\u0438 \u0430\u043d\u0430\u043b\u043e\u0433 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 (2), \u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043d\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f. <\/p>\n<p>  <\/p>\n<pre><code>long i = 0; Iterator&lt;Map.Entry&lt;Integer, Integer&gt;&gt; it = map.entrySet().iterator(); while (it.hasNext()) {     Map.Entry&lt;Integer, Integer&gt; pair = it.next();     i += pair.getKey() + pair.getValue(); }<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>Map.Entry<\/strong> \u0438 \u0446\u0438\u043a\u043b <strong>foreach<\/strong>. \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043e\u0431\u0445\u043e\u0434\u0430 map&#8217;\u044b. <\/p>\n<p>  <\/p>\n<pre><code>long i = 0; for (Map.Entry&lt;Integer, Integer&gt; pair : map.entrySet()) {     i += pair.getKey() + pair.getValue(); }<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>foreach<\/strong> \u0438\u0437 <code>Java 8<\/code>. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u043d \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0432 Java 8. <\/p>\n<p>  <\/p>\n<pre><code>final long[] i = {0}; map.forEach((k, v) -&gt; i[0] += k + v);<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>keySet<\/strong> \u0438 <strong>foreach<\/strong>. \u0421\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439, \u0432\u043e\u043f\u0440\u043e\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e.<\/p>\n<p>  <\/p>\n<pre><code>long i = 0; for (Integer key : map.keySet()) {     i += key + map.get(key); }<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>keySet<\/strong> \u0438 <strong>iterator<\/strong>. \u041f\u043e \u0441\u0443\u0442\u0438, \u0432\u0430\u0440\u0438\u0430\u043d\u0442 4 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0435\u0437 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u0430\u0445\u0430\u0440\u0430.<\/p>\n<p>  <\/p>\n<pre><code>long i = 0; Iterator&lt;Integer&gt; itr2 = map.keySet().iterator(); while (itr2.hasNext()) {     Integer key = itr2.next();     i += key + map.get(key); }<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>for<\/strong> \u0438 <strong>Map.Entry<\/strong>. \u0410\u043d\u0430\u043b\u043e\u0433 1 \u0438 2, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 &quot;\u0441\u0442\u0430\u0440\u043e\u043c \u0441\u0442\u0438\u043b\u0435&quot;<\/p>\n<p>  <\/p>\n<pre><code>long i = 0; for (Iterator&lt;Map.Entry&lt;Integer, Integer&gt;&gt; entries = map.entrySet().iterator(); entries.hasNext(); ) {     Map.Entry&lt;Integer, Integer&gt; entry = entries.next();     i += entry.getKey() + entry.getValue(); }<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>Java 8<\/code> \u0438 <strong>Stream Api<\/strong><\/p>\n<p>  <\/p>\n<pre><code>final long[] i = {0}; map.entrySet().stream().forEach(e -&gt; i[0] += e.getKey() + e.getValue());<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>Java 8<\/code> \u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 <strong>Stream Api<\/strong><\/p>\n<p>  <\/p>\n<pre><code>final long[] i = {0}; map.entrySet().stream().parallel().forEach(e -&gt; i[0] += e.getKey() + e.getValue());<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>IterableMap<\/strong> \u043e\u0442 <code>Apache Collections<\/code>. \u0414\u0430\u043d\u043d\u0430\u044f map&#8217;a \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043e\u0431\u0445\u043e\u0434\u0430. <\/p>\n<p>  <\/p>\n<pre><code>long i = 0; MapIterator&lt;Integer, Integer&gt; it = iterableMap.mapIterator(); while (it.hasNext()) {     i += it.next() + it.getValue(); }<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>MutableMap<\/strong> \u043e\u0442 <code>Eclipse collections<\/code> (\u0431\u044b\u0432\u0448\u0438\u0435 GS \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438). \u0414\u0430\u043d\u043d\u0430\u044f map&#8217;a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u0441\u0432\u043e\u0439 forEach \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u0447\u0435\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c Java 8.<\/p>\n<p>  <\/p>\n<pre><code>final long[] i = {0}; mutableMap.forEachKeyValue((key, value) -&gt; {     i[0] += key + value; });<\/code><\/pre>\n<p>  <\/li>\n<\/ol>\n<p>  <\/p>\n<h3><strong>\u0422\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/strong><\/h3>\n<p>  <\/p>\n<blockquote><p><strong>\u0422\u0438\u043f\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435<\/strong>: \u0412\u0441\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u0430\u043d\u044b \u043a\u0430\u043a \u0435\u0441\u0442\u044c, \u0437\u0430\u043c\u0435\u0440\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0435\u0449\u044c \u0441\u043b\u043e\u0436\u043d\u0430\u044f, \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0432\u0441\u0435 \u0447\u0438\u0441\u043b\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043c\u043d\u0435 \u0432\u0435\u0440\u0438\u0442\u044c, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b \u043d\u0430 <a href=\"https:\/\/github.com\/Vedenin\/useful-java-links\/blob\/master\/helloworlds\/5.0-other-examples\/src\/main\/java\/other_examples\/IterateThroughHashMapTest.java\">github&#8217;e<\/a>, \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. \u0415\u0441\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u044f \u0433\u0434\u0435-\u0442\u043e \u043e\u0448\u0438\u0431\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043c\u0435\u0440\u0430\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (\u0430 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e), \u0431\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u0435\u0441\u043b\u0438 \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043b\u0438\u0447\u043a\u0443 \u0438\u043b\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438.<\/p><\/blockquote>\n<p>  <\/p>\n<p>\u0420\u0435\u0436\u0438\u043c = \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f (AverageTime), \u0441\u0438\u0441\u0442\u0435\u043c\u0430 = Win 8.1 64-bit, Intel i7-4790 3.60GHz 3.60GHz, 16 GB, \u0447\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 score \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435)<\/p>\n<p>  <\/p>\n<p>1) \u0414\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 map (100 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432), score 0.308 \u2014 \u043b\u0443\u0447\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <\/p>\n<p>  <\/p>\n<pre><code class=\"java\">           Benchmark       Size Mode    Cnt     Score            Error  Units 3. ForEachAndJava8        100   avgt    100 0.312   \u00b1   0.003   us\/op 10. EclipseMap            100   avgt    100 0.354   \u00b1   0.003   us\/op 2. ForEachAndMapEntry     100   avgt    100 0.403   \u00b1   0.005   us\/op 1. WhileAndMapEntry       100   avgt    100 0.427   \u00b1   0.006   us\/op 6. ForAndIterator         100   avgt    100 0.427   \u00b1   0.006   us\/op 7. Java8StreamApi         100   avgt    100 0.529   \u00b1   0.004   us\/op 9. ApacheIterableMap      100   avgt    100 0.585   \u00b1   0.008   us\/op 4. KeySetAndForEach       100   avgt    100 0.937   \u00b1   0.011   us\/op 5. KeySetAndIterator      100   avgt    100 0.94    \u00b1   0.011   us\/op 8. Java8StreamApiParallel 100   avgt    100 6.066   \u00b1   0.051   us\/op <\/code><\/pre>\n<p>  <\/p>\n<p>2) \u0414\u043b\u044f \u0441\u0440\u0435\u0434\u043d\u0438\u0445 map \u0441 10000 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438, score 37.606 \u2014 \u043b\u0443\u0447\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">           Benchmark      Size   Mode   Cnt    Score            Error  Units 10. EclipseMap            10000  avgt   100 35.301  \u00b1   0.697   us\/op 3. ForEachAndJava8        10000  avgt   100 39.797  \u00b1   0.309   us\/op 2. ForEachAndMapEntry     10000  avgt   100 43.149  \u00b1   0.313   us\/op 1. WhileAndMapEntry       10000  avgt   100 43.295  \u00b1   0.314   us\/op 6. ForAndIterator         10000  avgt   100 44.009  \u00b1   0.379   us\/op 7. Java8StreamApi         10000  avgt   100 49.378  \u00b1   0.415   us\/op 5. KeySetAndIterator      10000  avgt   100 97.844  \u00b1   0.896   us\/op 4. KeySetAndForEach       10000  avgt   100 99.317  \u00b1   0.862   us\/op 8. Java8StreamApiParallel 10000  avgt   100 112.364 \u00b1   0.167   us\/op 9. ApacheIterableMap      10000  avgt   100 138.379 \u00b1   1.387   us\/op<\/code><\/pre>\n<p>  <\/p>\n<p>3) \u0414\u043b\u044f map \u0441 30000 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438, score 122.277 \u2014 \u043b\u0443\u0447\u0448\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">           Benchmark      Size  Mode  Cnt        Score          Error  Units 10. EclipseMap            30000 avgt    100 122.277 \u00b1   3.896   us\/op 3. ForEachAndJava8        30000 avgt    100 136.906 \u00b1   2.392   us\/op 2. ForEachAndMapEntry     30000 avgt    100 145.845 \u00b1   1.895   us\/op 1. WhileAndMapEntry       30000 avgt    100 149.186 \u00b1   2.621   us\/op 6. ForAndIterator         30000 avgt    100 149.353 \u00b1   2.427   us\/op 7. Java8StreamApi         30000 avgt    100 181.114 \u00b1   3.272   us\/op 8. Java8StreamApiParallel 30000 avgt    100 342.546 \u00b1   1.206   us\/op 5. KeySetAndIterator      30000 avgt    100 350.564 \u00b1   8.662   us\/op 4. KeySetAndForEach       30000 avgt    100 364.362 \u00b1   9.416   us\/op 9. ApacheIterableMap      30000 avgt    100 536.749 \u00b1   25.819  us\/op <\/code><\/pre>\n<p>  <\/p>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a (\u0442\u0435\u0441\u0442\u044b \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 map&#8217;\u044b)<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/habrastorage.org\/files\/c6a\/30a\/108\/c6a30a1088704879adb0ea5fda676410.png\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c6a\/30a\/108\/c6a30a1088704879adb0ea5fda676410.png\" alt=\"enter image description here\"\/><\/a><\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 (\u0442\u0435\u0441\u0442\u044b \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 map&#8217;\u044b)<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">     Benchmark             100    500   900 1300    1700    2100    2500 10. EclipseMap            0.354  1.384  3.816   3.304   6.68    7.427   8.712 3. ForEachAndJava8        0.312  1.692  3.143   4.265   6.506   8.343   9.821 6. ForAndIterator         0.427  2.089  3.746   4.776   7.407   9.091   10.753 2. ForEachAndMapEntry     0.403 2.536    3.951  5.028   7.503   9.211   10.918 1. WhileAndMapEntry       0.427  2.026  3.4815  4.937   7.511   9.217   12.22 7. Java8StreamApi         0.529  2.343  4.264   5.399   8.826   12.633  12.918 9. ApacheIterableMap      0.585 2.725    5.574  9.292   13.01   17.719  23.882 5. KeySetAndIterator      0.94   4.592  8.24    12.496  16.077  21.012  24.389 4. KeySetAndForEach       0.937  4.572  8.251   12.522  14.831  20.502  24.881 8. Java8StreamApiParallel 6.066 12.152   16.563 18.512  25.987  28.813  33.336 <\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u0442\u0435\u0441\u0442\u044b \u043d\u0430 <a href=\"https:\/\/github.com\/Vedenin\/useful-java-links\/blob\/master\/helloworlds\/5.0-other-examples\/src\/main\/java\/other_examples\/IterateThroughHashMapTest.java\">github<\/a><\/p>\n<p>  <\/p>\n<h3>2. \u041f\u043e\u0434\u0441\u0447\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0443<\/h3>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u043d\u0430\u0439\u0434\u0435\u043c \u0432\u0441\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432 \u043d\u0435\u0439: <\/p>\n<p>  <\/p>\n<pre><code>   String testString = &quot;a.b.c.d&quot;;<\/code><\/pre>\n<p>  <\/p>\n<p>1) \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>Apache Commons<\/strong><\/p>\n<p>  <\/p>\n<pre><code>int apache = StringUtils.countMatches(testString, &quot;.&quot;); System.out.println(&quot;apache = &quot; + apache);<\/code><\/pre>\n<p>  <\/p>\n<p>2) \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>Spring Framework&#8217;s<\/strong><\/p>\n<p>  <\/p>\n<pre><code>int spring = org.springframework.util.StringUtils.countOccurrencesOf(testString, &quot;.&quot;); System.out.println(&quot;spring = &quot; + spring);<\/code><\/pre>\n<p>  <\/p>\n<p>3) \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>replace<\/strong><\/p>\n<p>  <\/p>\n<pre><code>int replace = testString.length() - testString.replace(&quot;.&quot;, &quot;&quot;).length(); System.out.println(&quot;replace = &quot; + replace);<\/code><\/pre>\n<p>  <\/p>\n<p>4) \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>replaceAll<\/strong> (case 1)<\/p>\n<p>  <\/p>\n<pre><code>int replaceAll = testString.replaceAll(&quot;[^.]&quot;, &quot;&quot;).length(); System.out.println(&quot;replaceAll = &quot; + replaceAll);<\/code><\/pre>\n<p>  <\/p>\n<p>5) \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>replaceAll<\/strong> (case 2)<\/p>\n<p>  <\/p>\n<pre><code>int replaceAllCase2 = testString.length() - testString.replaceAll(&quot;\\\\.&quot;, &quot;&quot;).length(); System.out.println(&quot;replaceAll (second case) = &quot; + replaceAllCase2);<\/code><\/pre>\n<p>  <\/p>\n<p>6) \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>split<\/strong><\/p>\n<p>  <\/p>\n<pre><code>int split = testString.split(&quot;\\\\.&quot;,-1).length-1; System.out.println(&quot;split = &quot; + split);<\/code><\/pre>\n<p>  <\/p>\n<p>7) \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>Java8<\/strong> (case 1)<\/p>\n<p>  <\/p>\n<pre><code>long java8 = testString.chars().filter(ch -&gt; ch =='.').count(); System.out.println(&quot;java8 = &quot; + java8);<\/code><\/pre>\n<p>  <\/p>\n<p>8) \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>Java8<\/strong> (case 2), may be better for unicode then case 1<\/p>\n<p>  <\/p>\n<pre><code>long java8Case2 = testString.codePoints().filter(ch -&gt; ch =='.').count(); System.out.println(&quot;java8 (second case) = &quot; + java8Case2);<\/code><\/pre>\n<p>  <\/p>\n<p>9) \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>StringTokenizer<\/strong><\/p>\n<p>  <\/p>\n<pre><code>int stringTokenizer = new StringTokenizer(&quot; &quot; +testString + &quot; &quot;, &quot;.&quot;).countTokens()-1; System.out.println(&quot;stringTokenizer = &quot; + stringTokenizer);<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0435\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0432\u0435 \u0442\u043e\u0447\u043a\u0438 \u043f\u043e\u0434\u0440\u044f\u0434 \u0431\u0443\u0434\u0443\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u043e\u0434\u043d\u0443, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f a&#8230;b.c&#8230;.d or &#8230;a.b.c.d \u0438\u043b\u0438 a&#8230;.b&#8230;&#8230;c&#8230;..d\u2026 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0447\u0435\u043a \u0431\u0443\u0434\u0443\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u043e\u0434\u043d\u0443.<\/p>\n<p>  <\/p>\n<blockquote><p><strong>\u0422\u0438\u043f\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435<\/strong>: \u0412\u0441\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u0430\u043d\u044b \u043a\u0430\u043a \u0435\u0441\u0442\u044c, \u0437\u0430\u043c\u0435\u0440\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0435\u0449\u044c \u0441\u043b\u043e\u0436\u043d\u0430\u044f, \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0432\u0441\u0435 \u0447\u0438\u0441\u043b\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043c\u043d\u0435 \u0432\u0435\u0440\u0438\u0442\u044c, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b \u043d\u0430 <a href=\"https:\/\/github.com\/Vedenin\/useful-java-links\/blob\/master\/helloworlds\/5.0-other-examples\/src\/main\/java\/other_examples\/FindCountOfOccurrencesBenchmark.java\">github&#8217;e<\/a>, \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. \u0415\u0441\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u044f \u0433\u0434\u0435-\u0442\u043e \u043e\u0448\u0438\u0431\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043c\u0435\u0440\u0430\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (\u0430 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e), \u0431\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u0435\u0441\u043b\u0438 \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043b\u0438\u0447\u043a\u0443 \u0438\u043b\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438.<\/p><\/blockquote>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u0442\u0435\u0441\u0442\u044b \u043d\u0430 <a href=\"https:\/\/github.com\/Vedenin\/java_in_examples\/blob\/master\/other\/src\/main\/java\/com\/github\/vedenin\/eng\/string_and_stream\/StringUtilsTest.java\">github<\/a><\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/Vedenin\/useful-java-links\/blob\/master\/helloworlds\/5.0-other-examples\/src\/main\/java\/other_examples\/FindCountOfOccurrencesBenchmark.java\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043c\u0435\u0440\u043e\u0432<\/a> \u043d\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <a href=\"http:\/\/openjdk.java.net\/projects\/code-tools\/jmh\/\">JMH<\/a>, mode = AverageTime, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>0.010<\/code> \u043b\u0443\u0447\u0448\u0435 \u0447\u0435\u043c <code>0.351<\/code>): <\/p>\n<p>  <\/p>\n<pre><code>Benchmark              Mode  Cnt  Score    Error  Units 1. countMatches        avgt    5  0.010 \u00b1  0.001  us\/op 2. countOccurrencesOf  avgt    5  0.010 \u00b1  0.001  us\/op 3. stringTokenizer     avgt    5  0.028 \u00b1  0.002  us\/op 4. java8_1             avgt    5  0.077 \u00b1  0.005  us\/op 5. java8_2             avgt    5  0.078 \u00b1  0.003  us\/op 6. split               avgt    5  0.137 \u00b1  0.009  us\/op 7. replaceAll_2        avgt    5  0.302 \u00b1  0.047  us\/op 8. replace             avgt    5  0.303 \u00b1  0.034  us\/op 9. replaceAll_1        avgt    5  0.351 \u00b1  0.045  us\/op<\/code><\/pre>\n<p>  <\/p>\n<p><a href=\"https:\/\/github.com\/Vedenin\/useful-java-links\/blob\/master\/helloworlds\/5.0-other-examples\/src\/main\/java\/other_examples\/FindCountOfOccurrencesBenchmark.java\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043c\u0435\u0440\u043e\u0432<\/a> \u043d\u0430 \u0434\u043b\u0438\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0434\u043b\u0438\u043d\u043d\u0430 = 2142 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <a href=\"http:\/\/openjdk.java.net\/projects\/code-tools\/jmh\/\">JMH<\/a>, mode = AverageTime, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>0.010<\/code> \u043b\u0443\u0447\u0448\u0435 \u0447\u0435\u043c <code>0.351<\/code>): <\/p>\n<p>  <\/p>\n<pre><code class=\"java\">Benchmark             Mode  Cnt   Score   Error  Units 1. countMatches        avgt    5   2.392 \u00b1 0.172  us\/op 2. countOccurrencesOf  avgt    5   2.362 \u00b1 0.060  us\/op 3. stringTokenizer     avgt    5   5.931 \u00b1 0.112  us\/op 4. java8               avgt    5   9.626 \u00b1 0.463  us\/op 5. java8_1             avgt    5   8.586 \u00b1 0.251  us\/op 6. split               avgt    5  21.201 \u00b1 1.037  us\/op 7. replaceAll2         avgt    5  26.614 \u00b1 1.026  us\/op 8. replaceAll1         avgt    5  31.505 \u00b1 1.046  us\/op 9. replace             avgt    5  33.462 \u00b1 2.329  us\/op <\/code><\/pre>\n<p>  <\/p>\n<p><strong>P.S.<\/strong> \u0410\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 Stackoverflow: <a href=\"http:\/\/stackoverflow.com\/questions\/46898\/how-to-efficiently-iterate-over-each-entry-in-a-map\/35558955#35558955\">\u043f\u043e \u043e\u0431\u0445\u043e\u0434\u0443 map&#8217;\u044b<\/a> \u0438 <a href=\"http:\/\/stackoverflow.com\/questions\/275944\/how-do-i-count-the-number-of-occurrences-of-a-char-in-a-string\/35242882#35242882\">\u043f\u043e \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0443 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a<\/a>, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 <a href=\"https:\/\/github.com\/Vedenin\/useful-java-links\">useful-java-links<\/a>. \u0411\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u043f\u043b\u044e\u0441\u0430\u043c \u0432 SO \u0438\u043b\u0438 github&#8217;e, \u0435\u0441\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u043e\u043d\u0438 \u0437\u0430\u0441\u043b\u0443\u0436\u0435\u043d\u044b.<br \/>  <strong>P.P.S.<\/strong> \u0422\u0430\u043a \u0436\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043c\u043e\u0439 opensource \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/Vedenin\/useful-java-links\/tree\/master\/link-rus\">useful-java-links<\/a> \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u0430\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 Java \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0438 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0435\u043e. \u0422\u0430\u043a \u0436\u0435 \u0435\u0441\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f <a href=\"https:\/\/github.com\/Vedenin\/useful-java-links\/\">\u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f<\/a> \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e opensource \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/Vedenin\/useful-java-links\/tree\/master\/helloworlds\">Hello world<\/a> \u043f\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 Java \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0432 \u043e\u0434\u043d\u043e\u043c maven \u043f\u0440\u043e\u0435\u043a\u0442\u0435 (\u0431\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u0437\u0430 \u043b\u044e\u0431\u0443\u044e \u043f\u043e\u043c\u043e\u0449\u044c). <\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0431\u0449\u0435\u0435 \u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435 &#39;\u0428\u043f\u0430\u0440\u0433\u0430\u043b\u043e\u043a&#39;<\/b><\/p>\n<div class=\"spoiler_text\">\n<p><a href=\"https:\/\/habrahabr.ru\/post\/265061\/\">1. JPA \u0438 Hibernate \u0432 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445 \u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u0445<\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/post\/266821\/\">2. \u0422\u0440\u0438\u0441\u0442\u0430 \u043f\u044f\u0442\u044c\u0434\u0435\u0441\u044f\u0442 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043d\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 Java opensource \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 github <\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/luxoft\/blog\/256877\/\">3. \u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0432 Java (\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435, guava, apache, trove, gs-collections \u0438 \u0434\u0440\u0443\u0433\u0438\u0435) <\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/luxoft\/blog\/270383\/\">4. Java Stream API<\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/luxoft\/blog\/272025\/\">5. \u0414\u0432\u0435\u0441\u0442\u0438 \u043f\u044f\u0442\u044c\u0434\u0435\u0441\u044f\u0442 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0432\u0438\u0434\u0435\u043e \u0434\u043e\u043a\u043b\u0430\u0434\u043e\u0432 \u0438 \u043b\u0435\u043a\u0446\u0438\u0439 \u043e Java<\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/luxoft\/blog\/280784\/\">6. \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u0434\u043b\u044f Java \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430<\/a><br \/>  7 \u0422\u0438\u043f\u043e\u0432\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<br \/>  &nbsp;&nbsp;<a href=\"https:\/\/habrahabr.ru\/post\/278233\/\"> 7.1 \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f InputStream \u0432 \u0441\u0442\u0440\u043e\u043a\u0443<\/a><br \/>  &nbsp;&nbsp;<a href=\"https:\/\/habrahabr.ru\/post\/278313\/\"> 7.2 \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u0445\u043e\u0434\u0430 Map&#8217;\u044b, \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438<\/a><\/p>\n<\/div>\n<\/div>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/278313\/\"> https:\/\/habrahabr.ru\/post\/278313\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/447\/ad7\/e70\/447ad7e7084749cc99e04cac26210807.png\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0445\u043e\u0431\u0431\u0438: \u044f \u0441\u043e\u0431\u0438\u0440\u0430\u044e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0432 Java, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0436\u0443 \u0432 \u0438\u043d\u0435\u0442\u0435, \u0438 \u043f\u044b\u0442\u0430\u044e\u0441\u044c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443\/\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438\/\u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0430\u043a\u0443\u044e \u0442\u0438\u043f\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430 Java \u043a\u0430\u043a &quot;\u043e\u0431\u0445\u043e\u0434 Map&#8217;\u044b&quot; \u0438 \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0441\u0442\u0440\u043e\u043a, \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0435\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u0432\u043a\u043b\u044e\u0447\u0430\u044f &quot;\u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435&quot; \u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c) \u0438 \u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. <\/p>\n<p>  <\/p>\n<p>\u0410\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 Stackoverflow: <a href=\"http:\/\/stackoverflow.com\/questions\/46898\/how-to-efficiently-iterate-over-each-entry-in-a-map\/35558955#35558955\">\u043f\u043e \u043e\u0431\u0445\u043e\u0434\u0443 map&#8217;\u044b<\/a> \u0438 <a href=\"http:\/\/stackoverflow.com\/questions\/275944\/how-do-i-count-the-number-of-occurrences-of-a-char-in-a-string\/35242882#35242882\">\u043f\u043e \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0443 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a<\/a>.<br \/>  \u0422\u0430\u043a \u0436\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043c\u043e\u0439 opensource \u043f\u0440\u043e\u0435\u043a\u0442 <a href=\"https:\/\/github.com\/Vedenin\/useful-java-links\/tree\/master\/link-rus\">useful-java-links<\/a> \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u0430\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 Java \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432. <\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0431\u0449\u0435\u0435 \u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435 &#39;\u0428\u043f\u0430\u0440\u0433\u0430\u043b\u043e\u043a&#39;<\/b><\/p>\n<div class=\"spoiler_text\">\n<p><a href=\"https:\/\/habrahabr.ru\/post\/265061\/\">1. JPA \u0438 Hibernate \u0432 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u0445 \u0438 \u043e\u0442\u0432\u0435\u0442\u0430\u0445<\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/post\/266821\/\">2. \u0422\u0440\u0438\u0441\u0442\u0430 \u043f\u044f\u0442\u044c\u0434\u0435\u0441\u044f\u0442 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043d\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 Java opensource \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 github <\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/luxoft\/blog\/256877\/\">3. \u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0432 Java (\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435, guava, apache, trove, gs-collections \u0438 \u0434\u0440\u0443\u0433\u0438\u0435) <\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/luxoft\/blog\/270383\/\">4. Java Stream API<\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/luxoft\/blog\/272025\/\">5. \u0414\u0432\u0435\u0441\u0442\u0438 \u043f\u044f\u0442\u044c\u0434\u0435\u0441\u044f\u0442 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0432\u0438\u0434\u0435\u043e \u0434\u043e\u043a\u043b\u0430\u0434\u043e\u0432 \u0438 \u043b\u0435\u043a\u0446\u0438\u0439 \u043e Java<\/a><br \/>  <a href=\"https:\/\/habrahabr.ru\/company\/luxoft\/blog\/280784\/\">6. \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u0434\u043b\u044f Java \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430<\/a><br \/>  7 \u0422\u0438\u043f\u043e\u0432\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<br \/>  &nbsp;&nbsp;<a href=\"https:\/\/habrahabr.ru\/post\/278233\/\"> 7.1 \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f InputStream \u0432 \u0441\u0442\u0440\u043e\u043a\u0443<\/a><br \/>  &nbsp;&nbsp;<a href=\"https:\/\/habrahabr.ru\/post\/278313\/\"> 7.2 \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u0445\u043e\u0434\u0430 Map&#8217;\u044b, \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438<\/a><\/p>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-278539","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=278539"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278539\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=278539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=278539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=278539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}