Class TakeLowerNodeIdentifierStrategy

  • All Implemented Interfaces:
    java.io.Serializable, MergeForgivenessStrategy

    public class TakeLowerNodeIdentifierStrategy
    extends java.lang.Object
    implements MergeForgivenessStrategy
    A MergeForgivenessStrategy which returns a FeatureChange which takes the lower start or end node identifier when two edges conflict on that value. This protects against mutations that generate nodes that already exist in the underlying atlas.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.openstreetmap.atlas.geography.atlas.change.FeatureChange resolve​(org.openstreetmap.atlas.geography.atlas.change.FeatureChange left, org.openstreetmap.atlas.geography.atlas.change.FeatureChange right, java.util.Map<java.lang.String,​java.io.Serializable> configuration)
      Resolve a merge conflict between two FeatureChanges and return a new, valid FeatureChange that represents a merge between the two.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TakeLowerNodeIdentifierStrategy

        public TakeLowerNodeIdentifierStrategy()
    • Method Detail

      • resolve

        public org.openstreetmap.atlas.geography.atlas.change.FeatureChange resolve​(org.openstreetmap.atlas.geography.atlas.change.FeatureChange left,
                                                                                    org.openstreetmap.atlas.geography.atlas.change.FeatureChange right,
                                                                                    java.util.Map<java.lang.String,​java.io.Serializable> configuration)
        Description copied from interface: MergeForgivenessStrategy
        Resolve a merge conflict between two FeatureChanges and return a new, valid FeatureChange that represents a merge between the two.
        Specified by:
        resolve in interface MergeForgivenessStrategy
        Parameters:
        left - the left FeatureChange
        right - the right FeatureChange
        configuration - the configuration for the resolution
        Returns:
        the resolved FeatureChange