Class ReplaceTagFeatureChange
- java.lang.Object
-
- org.openstreetmap.atlas.checks.utility.feature_change.ReplaceTagFeatureChange
-
- All Implemented Interfaces:
IFeatureChange,IFeatureChange.TaggedChange
public class ReplaceTagFeatureChange extends java.lang.Object implements IFeatureChange, IFeatureChange.TaggedChange
Add a tag using another tag as the base. For example if the original tag is "highway=residential" and the replacement is "motorway", the new tag will be "motorway=residential". If the replacement is a full tag, that will be used. For example, "motorway=yes", the replacement will be "motorway=yes" regardless of the original tag. If the original tag should be removed, useRemoveTagFeatureChangeas well.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openstreetmap.atlas.checks.utility.feature_change.IFeatureChange
IFeatureChange.GeometryChange, IFeatureChange.TaggedChange
-
-
Constructor Summary
Constructors Constructor Description ReplaceTagFeatureChange(java.util.Map.Entry<java.lang.String,java.lang.String> tag, java.util.Map.Entry<java.lang.String,java.lang.String> newTag)Create a new ReplacementFeatureChange
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends org.openstreetmap.atlas.geography.atlas.complete.CompleteEntity<T>>
org.openstreetmap.atlas.geography.atlas.complete.CompleteEntity<T>apply(org.openstreetmap.atlas.geography.atlas.complete.CompleteEntity<T> completeEntity)Apply a change to a complete entity
-
-
-
Constructor Detail
-
ReplaceTagFeatureChange
public ReplaceTagFeatureChange(java.util.Map.Entry<java.lang.String,java.lang.String> tag, java.util.Map.Entry<java.lang.String,java.lang.String> newTag)Create a new ReplacementFeatureChange- Parameters:
tag- The original tagnewTag- The tag to replace the original tag with. If only a key, the original tag value will be used.
-
-
Method Detail
-
apply
public <T extends org.openstreetmap.atlas.geography.atlas.complete.CompleteEntity<T>> org.openstreetmap.atlas.geography.atlas.complete.CompleteEntity<T> apply(org.openstreetmap.atlas.geography.atlas.complete.CompleteEntity<T> completeEntity)
Description copied from interface:IFeatureChangeApply a change to a complete entity- Specified by:
applyin interfaceIFeatureChange- Type Parameters:
T- The type of the complete entity- Parameters:
completeEntity- The entity that will be changed- Returns:
- The new CompleteEntity (may be the entity from the parameter)
-
-