org.openstreetmap.osmosis.core.sort.v0_6
Class ChangeAsEntityComparator

java.lang.Object
  extended by org.openstreetmap.osmosis.core.sort.v0_6.ChangeAsEntityComparator
All Implemented Interfaces:
java.util.Comparator<ChangeContainer>

public class ChangeAsEntityComparator
extends java.lang.Object
implements java.util.Comparator<ChangeContainer>

Allows an entity comparator to be used for making change comparisons. It extracts the two entities from the changes and compares them using the underlying entity comparator.


Constructor Summary
ChangeAsEntityComparator(java.util.Comparator<EntityContainer> entityComparator)
          Creates a new instance.
 
Method Summary
 int compare(ChangeContainer o1, ChangeContainer o2)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

ChangeAsEntityComparator

public ChangeAsEntityComparator(java.util.Comparator<EntityContainer> entityComparator)
Creates a new instance.

Parameters:
entityComparator - The entity comparator to use for comparisons.
Method Detail

compare

public int compare(ChangeContainer o1,
                   ChangeContainer o2)

Specified by:
compare in interface java.util.Comparator<ChangeContainer>