Index: /trunk/src/org/openstreetmap/josm/data/osm/Tag.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/Tag.java	(revision 9535)
+++ /trunk/src/org/openstreetmap/josm/data/osm/Tag.java	(revision 9536)
@@ -2,4 +2,7 @@
 package org.openstreetmap.josm.data.osm;
 
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
 import java.util.Objects;
 
@@ -11,9 +14,12 @@
  * be empty, but not null.
  *
+ * <p/>
+ * It implements the {@link Tagged} interface. However, since instances of this class are immutable,
+ * the modifying methods throw an {@link UnsupportedOperationException}.
  */
-public class Tag {
+public class Tag implements Tagged {
 
-    private String key;
-    private String value;
+    private final String key;
+    private final String value;
 
     /**
@@ -131,3 +137,63 @@
         return Utils.strip(s).replaceAll("\\s+", " ");
     }
+
+    /**
+     * Unsupported.
+     * @param keys ignored
+     * @throws UnsupportedOperationException
+     */
+    @Override
+    public void setKeys(Map<String, String> keys) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public Map<String, String> getKeys() {
+        return Collections.singletonMap(key, value);
+    }
+
+    /**
+     * Unsupported.
+     * @param key ignored
+     * @param value ignored
+     * @throws UnsupportedOperationException
+     */
+    @Override
+    public void put(String key, String value) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String get(String k) {
+        return key.equals(k) ? value : null;
+    }
+
+    /**
+     * Unsupported.
+     * @param key ignored
+     * @throws UnsupportedOperationException
+     */
+    @Override
+    public void remove(String key) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public boolean hasKeys() {
+        return true;
+    }
+
+    @Override
+    public Collection<String> keySet() {
+        return Collections.singleton(key);
+    }
+
+    /**
+     * Unsupported.
+     * @throws UnsupportedOperationException
+     */
+    @Override
+    public void removeAll() {
+        throw new UnsupportedOperationException();
+    }
 }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/SearchBasedRowFilter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/SearchBasedRowFilter.java	(revision 9535)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/SearchBasedRowFilter.java	(revision 9536)
@@ -1,8 +1,4 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.dialogs.properties;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
 
 import javax.swing.RowFilter;
@@ -10,5 +6,5 @@
 
 import org.openstreetmap.josm.actions.search.SearchCompiler;
-import org.openstreetmap.josm.data.osm.Tagged;
+import org.openstreetmap.josm.data.osm.Tag;
 
 /**
@@ -34,55 +30,6 @@
         final String key = entry.getStringValue(0);
         final String value = entry.getStringValue(1);
-        return filter.match(new OneKeyValue(key, value));
+        return filter.match(new Tag(key, value));
     }
 
-    static class OneKeyValue implements Tagged {
-        private final String key;
-        private final String value;
-
-        OneKeyValue(String key, String value) {
-            this.key = key;
-            this.value = value;
-        }
-
-        @Override
-        public void setKeys(Map<String, String> keys) {
-            throw new UnsupportedOperationException();
-        }
-
-        @Override
-        public Map<String, String> getKeys() {
-            return Collections.singletonMap(key, value);
-        }
-
-        @Override
-        public void put(String key, String value) {
-            throw new UnsupportedOperationException();
-        }
-
-        @Override
-        public String get(String k) {
-            return key.equals(k) ? value : null;
-        }
-
-        @Override
-        public void remove(String key) {
-            throw new UnsupportedOperationException();
-        }
-
-        @Override
-        public boolean hasKeys() {
-            return true;
-        }
-
-        @Override
-        public Collection<String> keySet() {
-            return Collections.singleton(key);
-        }
-
-        @Override
-        public void removeAll() {
-            throw new UnsupportedOperationException();
-        }
-    }
 }
