| 1923 | } |
| 1924 | |
| 1925 | @Override |
| 1926 | public final void setCounters(final Map<CounterType, Integer> allCounters) { |
| 1927 | boolean changed = counters.containsKey(CounterEnumType.MANABOND) || counters.keySet().stream().allMatch(CounterType::isKeywordCounter); |
| 1928 | counters = allCounters; |
| 1929 | view.updateCounters(this); |
| 1930 | |
| 1931 | if (!isLKI()) { |
| 1932 | for (CounterType ct : counters.keySet()) { |
| 1933 | if (createCounterStatic(ct)) { |
| 1934 | changed = true; |
| 1935 | } |
| 1936 | } |
| 1937 | } |
| 1938 | if (changed) { |
| 1939 | updateKeywords(); |
| 1940 | } |
| 1941 | } |
| 1942 | |
| 1943 | @Override |
| 1944 | public final void clearCounters() { |