Class EndFeatures
java.lang.Object
com.dassault_systemes.modeler.kerml.model.EndFeatures
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FeaturecreateEndFeature(Type type) Creates a new end feature for the given type.static org.eclipse.emf.ecore.EClassReturns the EClass of the end‑feature membership for the given type.static FeaturegetOtherEnd(Feature end) Returns the other end of the binary type owning the given end feature.static FeaturegetOtherEnd(List<Feature> endFeatures, Feature end) Returns the other end of a binary type.static booleanisAlwaysBinary(Type type) Checks whether the type is always binary, based on its metaclass.static booleanisAssociationOrConnector(Element element) Checks whether the element is an association or connector.static booleanChecks whether the type is binary (i.e., has exactly two end features).static booleanChecks whether the element is an end feature.static booleanChecks whether the type is n‑ary (i.e., not binary).
-
Constructor Details
-
EndFeatures
public EndFeatures()
-
-
Method Details
-
createEndFeature
Creates a new end feature for the given type. The end feature is created using the appropriate EClass for the type and wrapped in a correspondingFeatureMembership. The membership is then added to the type.- Parameters:
type- the type for which to create an end feature- Returns:
- the created end feature
-
getEndFeatureMembershipEClass
Returns the EClass of the end‑feature membership for the given type. If the type already has end features, their membership EClass is used. Otherwise, a default membership EClass is selected.- Parameters:
type- the type- Returns:
- membership EClass
-
isBinary
Checks whether the type is binary (i.e., has exactly two end features).- Parameters:
type- the type- Returns:
- true if binary
-
isNary
Checks whether the type is n‑ary (i.e., not binary).- Parameters:
type- the type- Returns:
- true if n‑ary
-
isAlwaysBinary
Checks whether the type is always binary, based on its metaclass.- Parameters:
type- the type- Returns:
- true if always binary
-
getOtherEnd
Returns the other end of a binary type.- Parameters:
endFeatures- list of end featuresend- one of the ends- Returns:
- the opposite end
-
getOtherEnd
Returns the other end of the binary type owning the given end feature.- Parameters:
end- the end feature- Returns:
- the opposite end
-
isAssociationOrConnector
Checks whether the element is an association or connector.- Parameters:
element- the element- Returns:
- true if association or connector
-
isEnd
Checks whether the element is an end feature.- Parameters:
element- the element- Returns:
- true if the element is a feature marked as an end
-