public class DefaultWeightProvider extends AbstractWeightProvider
WeightProvider
applicable to
all objects.WeightProvider.Descriptor
Modifier and Type | Field and Description |
---|---|
protected int |
attributeChangeCoef
Weight coefficient of a change on an attribute.
|
protected int |
referenceChangeCoef
Weight coefficient of a change on a reference.
|
protected Map<EStructuralFeature,Integer> |
weights
The 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, 2014 Obeo and others. All rights reserved.