Subject: [PATCH] #24075: KeyedItem.MatchType#ofString
---
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
diff --git a/src/org/openstreetmap/josm/gui/tagging/presets/items/KeyedItem.java b/src/org/openstreetmap/josm/gui/tagging/presets/items/KeyedItem.java
|
a
|
b
|
|
| 78 | 78 | /** Positive if key and value matches, negative otherwise. */ |
| 79 | 79 | KEY_VALUE_REQUIRED("keyvalue!"); |
| 80 | 80 | |
| | 81 | private static final MatchType[] VALUES = values(); |
| | 82 | |
| 81 | 83 | private final String value; |
| 82 | 84 | |
| 83 | 85 | MatchType(String value) { |
| … |
… |
|
| 98 | 100 | * @return the {@code MatchType} for the given textual value |
| 99 | 101 | */ |
| 100 | 102 | public static MatchType ofString(String type) { |
| 101 | | for (MatchType i : EnumSet.allOf(MatchType.class)) { |
| | 103 | for (MatchType i : VALUES) { |
| 102 | 104 | if (i.getValue().equals(type)) |
| 103 | 105 | return i; |
| 104 | 106 | } |