public class DefaultWeightProvider extends AbstractWeightProvider
WeightProvider applicable to
 all objects.WeightProvider.Descriptor| Modifier and Type | Field and Description | 
|---|---|
| protected int | attributeChangeCoefWeight coefficient of a change on an attribute. | 
| protected int | referenceChangeCoefWeight coefficient of a change on a reference. | 
| protected Map<EStructuralFeature,Integer> | weightsThe list of specific weight to apply on specific Features. | 
MAJOR, MASSIVE, NORMAL, SIGNIFICANT, SMALL, UNLIKELY_TO_MATCH| Constructor and Description | 
|---|
| DefaultWeightProvider()Create the weight provider. | 
| Modifier and Type | Method and Description | 
|---|---|
| int | getContainingFeatureWeight(EObject a)Return the weight associated with the fact some Object has changed it's containing reference. | 
| int | getParentWeight(EObject a)Return the weight associated with the fact some Object has changed it's container. | 
| int | getWeight(EStructuralFeature feature)Return the weight for the given feature. | 
| protected boolean | irrelevant(EStructuralFeature feat)return true i the feature is irrelevant for the comparison. | 
protected Map<EStructuralFeature,Integer> weights
protected int referenceChangeCoef
protected int attributeChangeCoef
public int getWeight(EStructuralFeature feature)
feature - any EStructuralFeature.public int getParentWeight(EObject a)
a - any instance.public int getContainingFeatureWeight(EObject a)
a - any instance.protected boolean irrelevant(EStructuralFeature feat)
feat - any feature.
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.