- Timestamp:
- 2018-03-25T04:44:43+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
r13309 r13561 26 26 */ 27 27 public abstract class AbstractPrimitive implements IPrimitive { 28 29 /**30 * This is a visitor that can be used to loop over the keys/values of this primitive.31 *32 * @author Michael Zangl33 * @since 874234 * @since 10600 (functional interface)35 */36 @FunctionalInterface37 public interface KeyValueVisitor {38 39 /**40 * This method gets called for every tag received.41 *42 * @param primitive This primitive43 * @param key The key44 * @param value The value45 */46 void visitKeyValue(AbstractPrimitive primitive, String key, String value);47 }48 28 49 29 private static final AtomicLong idCounter = new AtomicLong(0); -
trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedNode.java
r11383 r13561 8 8 9 9 import org.openstreetmap.josm.command.Command; 10 import org.openstreetmap.josm.data.osm. AbstractPrimitive;10 import org.openstreetmap.josm.data.osm.KeyValueVisitor; 11 11 import org.openstreetmap.josm.data.osm.Node; 12 12 import org.openstreetmap.josm.data.osm.OsmPrimitive; 13 import org.openstreetmap.josm.data.osm.Tagged; 13 14 import org.openstreetmap.josm.data.validation.Severity; 14 15 import org.openstreetmap.josm.data.validation.Test; … … 20 21 * @author frsantos 21 22 */ 22 public class UntaggedNode extends Test implements AbstractPrimitive.KeyValueVisitor {23 public class UntaggedNode extends Test implements KeyValueVisitor { 23 24 24 25 protected static final int UNTAGGED_NODE_BLANK = 201; … … 54 55 } 55 56 56 private static OsmPrimitive[] castPrim( AbstractPrimitiven) {57 private static OsmPrimitive[] castPrim(Tagged n) { 57 58 return n instanceof OsmPrimitive ? (new OsmPrimitive[]{(OsmPrimitive) n}) : (new OsmPrimitive[0]); 58 59 } 59 60 60 61 @Override 61 public void visitKeyValue( AbstractPrimitiven, String key, String value) {62 public void visitKeyValue(Tagged n, String key, String value) { 62 63 if (key.toLowerCase(Locale.ENGLISH).contains("fixme") || value.toLowerCase(Locale.ENGLISH).contains("fixme")) { 63 64 /* translation note: don't translate quoted words */ -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
r13507 r13561 30 30 31 31 import org.openstreetmap.josm.data.Version; 32 import org.openstreetmap.josm.data.osm.AbstractPrimitive; 33 import org.openstreetmap.josm.data.osm.AbstractPrimitive.KeyValueVisitor; 32 import org.openstreetmap.josm.data.osm.KeyValueVisitor; 34 33 import org.openstreetmap.josm.data.osm.Node; 35 34 import org.openstreetmap.josm.data.osm.OsmPrimitive; 36 35 import org.openstreetmap.josm.data.osm.Relation; 36 import org.openstreetmap.josm.data.osm.Tagged; 37 37 import org.openstreetmap.josm.data.osm.Way; 38 38 import org.openstreetmap.josm.data.preferences.sources.SourceEntry; … … 197 197 198 198 @Override 199 public void visitKeyValue( AbstractPrimitivep, String key, String value) {199 public void visitKeyValue(Tagged p, String key, String value) { 200 200 MapCSSKeyRules v = index.get(key); 201 201 if (v != null) {
Note:
See TracChangeset
for help on using the changeset viewer.