Package com._1c.g5.v8.dt.compare.model
Class ComparedFeatures<F extends org.eclipse.emf.ecore.EStructuralFeature>
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.model.ComparedFeatures<F>
-
public class ComparedFeatures<F extends org.eclipse.emf.ecore.EStructuralFeature> extends Object
Represents a compared features for a triple ofEObject's.
-
-
Constructor Summary
Constructors Constructor Description ComparedFeatures(F feature)Constructor.ComparedFeatures(F mainFeature, F otherFeature)Constructor.ComparedFeatures(F mainFeature, F otherFeature, F commonAncestorFeature)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FgetCommonAncestorFeature()Returns the common ancestor compared feature.FgetFeature(ComparisonSide side)Returns the compared feature for the specified comparison side.FgetMainFeature()Returns the main compared feature.FgetOtherFeature()Returns the other compared feature.booleanisContainment()Tells whether the stored feature(s) is containment one(s), seeEReference.isContainment().booleanisMany()Tells whether the stored feature(s) is many, seeETypedElement.isMany().
-
-
-
Constructor Detail
-
ComparedFeatures
public ComparedFeatures(F feature)
Constructor. Uses the given feature for all comparison sides if needed.- Parameters:
feature- the compared feature, cannot benull
-
ComparedFeatures
public ComparedFeatures(F mainFeature, F otherFeature)
Constructor. Uses the main feature for theComparisonSide.COMMON_ANCESTORcomparison side if needed.- Parameters:
mainFeature- the main compared feature, cannot benullotherFeature- the other compared feature, cannot benull
-
ComparedFeatures
public ComparedFeatures(F mainFeature, F otherFeature, F commonAncestorFeature)
Constructor.- Parameters:
mainFeature- the main compared feature, cannot benullotherFeature- the other compared feature, cannot benullcommonAncestorFeature- the common ancestor feature, cannot benull
-
-
Method Detail
-
getMainFeature
public F getMainFeature()
Returns the main compared feature.- Returns:
- the main compared feature, never
null
-
getOtherFeature
public F getOtherFeature()
Returns the other compared feature.- Returns:
- the other compared feature, never
null
-
getCommonAncestorFeature
public F getCommonAncestorFeature()
Returns the common ancestor compared feature.- Returns:
- the common ancestor compared feature, never
null
-
getFeature
public F getFeature(ComparisonSide side)
Returns the compared feature for the specified comparison side.- Parameters:
side- the side to get the compared feature for, cannot benull- Returns:
- the compared feature, never
null
-
isMany
public boolean isMany()
Tells whether the stored feature(s) is many, seeETypedElement.isMany().- Returns:
trueif case of many-feature,falseotherwise
-
isContainment
public boolean isContainment()
Tells whether the stored feature(s) is containment one(s), seeEReference.isContainment().- Returns:
trueif case of containment features,falseotherwise
-
-