Class 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, use RemoveTagFeatureChange as well.
    • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 tag
        newTag - 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: IFeatureChange
        Apply a change to a complete entity
        Specified by:
        apply in interface IFeatureChange
        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)