public class ProximityIndex extends Object implements EObjectIndex, MatchAheadOfTime
EObjectIndex.Side| Constructor and Description |
|---|
ProximityIndex(ProximityEObjectMatcher.DistanceFunction meter,
ScopeQuery matcher)
Create a new
ProximityIndex using the given distance function. |
| Modifier and Type | Method and Description |
|---|---|
Map<EObjectIndex.Side,EObject> |
findClosests(Comparison inProgress,
EObject eObj,
EObjectIndex.Side passedObjectSide)
Return the closest EObjects found in other sides than the one given.
|
Collection<EObject> |
getValuesStillThere(EObjectIndex.Side side)
return the list of EObjects of a given side still available in the index.
|
Iterable<EObject> |
getValuesToMatchAhead(EObjectIndex.Side left)
Return EObjects to match ahead of time if there are some.
|
void |
index(EObject eObject,
EObjectIndex.Side side)
Register an Object in the index with the given side.
|
void |
remove(EObject obj,
EObjectIndex.Side side)
Remove an object from the index.
|
public ProximityIndex(ProximityEObjectMatcher.DistanceFunction meter, ScopeQuery matcher)
ProximityIndex using the given distance function.meter - the distance function to use to compare the EObjects.matcher - the object used to know if an instance is in the scope or not.public Map<EObjectIndex.Side,EObject> findClosests(Comparison inProgress, EObject eObj, EObjectIndex.Side passedObjectSide)
findClosests in interface EObjectIndexinProgress - the comparison currently being computed. It will not be changed directly but only queried to
know if some element has already been matched or not.eObj - the base EObject used to lookup similar ones.passedObjectSide - the side of the passed EObject.public void remove(EObject obj, EObjectIndex.Side side)
remove in interface EObjectIndexobj - object to remove.side - Side in which this object was.public void index(EObject eObject, EObjectIndex.Side side)
index in interface EObjectIndexeObject - the EObject to register.side - the side in which it should be registered.public Collection<EObject> getValuesStillThere(EObjectIndex.Side side)
getValuesStillThere in interface EObjectIndexside - the side we are looking for.public Iterable<EObject> getValuesToMatchAhead(EObjectIndex.Side left)
getValuesToMatchAhead in interface MatchAheadOfTimeleft - the side to look for.
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.