Package org.eclipse.emf.compare.match.eobject

## Class EcoreWeightProvider

- java.lang.Object
- - org.eclipse.emf.compare.match.eobject.AbstractWeightProvider
  - - org.eclipse.emf.compare.match.eobject.DefaultWeightProvider
    - - org.eclipse.emf.compare.match.eobject.EcoreWeightProvider

All Implemented Interfaces:
  `WeightProvider`

    public class EcoreWeightProvider
    extends DefaultWeightProvider

The implementation of `WeightProvider` applicable to all ecore objects.

Since:
  3.1.0

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.emf.compare.match.eobject.WeightProvider

`WeightProvider.Descriptor`

### Field Summary

### Fields inherited from class org.eclipse.emf.compare.match.eobject.DefaultWeightProvider

`attributeChangeCoef, referenceChangeCoef, weights`

### Fields inherited from class org.eclipse.emf.compare.match.eobject.AbstractWeightProvider

`MAJOR, MASSIVE, NORMAL, SIGNIFICANT, SMALL, UNLIKELY_TO_MATCH`

### Constructor Summary

Constructors
`EcoreWeightProvider()`

### Method Summary

All Methods Instance Methods Concrete Methods
`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.

### Methods inherited from class org.eclipse.emf.compare.match.eobject.DefaultWeightProvider

`irrelevant`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### EcoreWeightProvider

    public EcoreWeightProvider()

### Method Detail

#### getWeight

    public int getWeight​(EStructuralFeature feature)

Return the weight for the given feature.

Specified by:
  `getWeight` in interface `WeightProvider`
Overrides:
  `getWeight` in class `DefaultWeightProvider`
Parameters:
  `feature` - any `EStructuralFeature`.
Returns:
  the weight for the given feature. 0 meaning no effects.

#### getParentWeight

    public int getParentWeight​(EObject a)

Return the weight associated with the fact some Object has changed it's container.

Specified by:
  `getParentWeight` in interface `WeightProvider`
Overrides:
  `getParentWeight` in class `DefaultWeightProvider`
Parameters:
  `a` - any instance.
Returns:
  a weight representing the importance of the change of container to compute matches.

#### getContainingFeatureWeight

    public int getContainingFeatureWeight​(EObject a)

Return the weight associated with the fact some Object has changed it's containing reference.

Specified by:
  `getContainingFeatureWeight` in interface `WeightProvider`
Overrides:
  `getContainingFeatureWeight` in class `DefaultWeightProvider`
Parameters:
  `a` - any instance.
Returns:
  a weight representing the importance of the change of containing reference to compute matches.