Changeset 13430 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2018-02-17T15:40:42+01:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Tagged.java
r13414 r13430 76 76 /** 77 77 * Replies true if there is a tag with key <code>key</code>. 78 * The value could however be empty. See {@link #hasTag(String)} to check for non-empty tags. 78 79 * 79 80 * @param key the key 80 81 * @return true, if there is a tag with key <code>key</code> 82 * @see #hasTag(String) 81 83 * @since 11608 82 84 */ 83 85 default boolean hasKey(String key) { 84 86 return get(key) != null; 87 } 88 89 /** 90 * Replies true if there is a non-empty tag with key <code>key</code>. 91 * 92 * @param key the key 93 * @return true, if there is a non-empty tag with key <code>key</code> 94 * @see Tagged#hasKey(String) 95 * @since 13430 96 */ 97 default boolean hasTag(String key) { 98 String v = get(key); 99 return v != null && !v.isEmpty(); 85 100 } 86 101 -
trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
r13317 r13430 836 836 return false; 837 837 case MISSING_KEY: 838 return osm.get(key) == null;838 return !osm.hasTag(key); 839 839 case ANY: 840 840 return true; 841 841 case ANY_VALUE: 842 return osm. get(key) != null;842 return osm.hasTag(key); 843 843 case ANY_KEY: 844 844 for (String v:osm.getKeys().values()) {
Note:
See TracChangeset
for help on using the changeset viewer.