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 F
getCommonAncestorFeature()
Returns the common ancestor compared feature.F
getFeature(ComparisonSide side)
Returns the compared feature for the specified comparison side.F
getMainFeature()
Returns the main compared feature.F
getOtherFeature()
Returns the other compared feature.boolean
isContainment()
Tells whether the stored feature(s) is containment one(s), seeEReference.isContainment()
.boolean
isMany()
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_ANCESTOR
comparison side if needed.- Parameters:
mainFeature
- the main compared feature, cannot benull
otherFeature
- the other compared feature, cannot benull
-
ComparedFeatures
public ComparedFeatures(F mainFeature, F otherFeature, F commonAncestorFeature)
Constructor.- Parameters:
mainFeature
- the main compared feature, cannot benull
otherFeature
- the other compared feature, cannot benull
commonAncestorFeature
- 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:
true
if case of many-feature,false
otherwise
-
isContainment
public boolean isContainment()
Tells whether the stored feature(s) is containment one(s), seeEReference.isContainment()
.- Returns:
true
if case of containment features,false
otherwise
-
-