public class CachingDistance extends Object implements ProximityEObjectMatcher.DistanceFunction
Constructor and Description |
---|
CachingDistance(ProximityEObjectMatcher.DistanceFunction wrapped)
Create a new caching distance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areIdentic(Comparison inProgress,
EObject a,
EObject b)
Check that two objects are equals from the distance function point of view (distance should be 0)
You should prefer this method when you just want to check objects are not equals enabling the
distance to stop sooner.
|
double |
distance(Comparison inProgress,
EObject a,
EObject b)
Return the distance between two EObjects.
|
public CachingDistance(ProximityEObjectMatcher.DistanceFunction wrapped)
wrapped
- actual distance function to cache results from.public double distance(Comparison inProgress, EObject a, EObject b)
distance
in interface ProximityEObjectMatcher.DistanceFunction
inProgress
- the comparison being processed right now. This might be used for the distance to
retrieve other matches for instance.a
- first object.b
- second object.public boolean areIdentic(Comparison inProgress, EObject a, EObject b)
areIdentic
in interface ProximityEObjectMatcher.DistanceFunction
inProgress
- the comparison being processed right now. This might be used for the distance to
retrieve other matches for instance.a
- first object.b
- second object.
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.