Class EndFeatures

java.lang.Object
com.dassault_systemes.modeler.kerml.model.EndFeatures

@OpenApiAll public class EndFeatures extends Object
  • Constructor Details

    • EndFeatures

      public EndFeatures()
  • Method Details

    • createEndFeature

      public static Feature createEndFeature(Type type)
      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 corresponding FeatureMembership. 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

      public static org.eclipse.emf.ecore.EClass getEndFeatureMembershipEClass(Type type)
      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

      public static boolean isBinary(Type type)
      Checks whether the type is binary (i.e., has exactly two end features).
      Parameters:
      type - the type
      Returns:
      true if binary
    • isNary

      public static boolean isNary(Type type)
      Checks whether the type is n‑ary (i.e., not binary).
      Parameters:
      type - the type
      Returns:
      true if n‑ary
    • isAlwaysBinary

      public static boolean isAlwaysBinary(Type type)
      Checks whether the type is always binary, based on its metaclass.
      Parameters:
      type - the type
      Returns:
      true if always binary
    • getOtherEnd

      public static Feature getOtherEnd(List<Feature> endFeatures, Feature end)
      Returns the other end of a binary type.
      Parameters:
      endFeatures - list of end features
      end - one of the ends
      Returns:
      the opposite end
    • getOtherEnd

      public static Feature getOtherEnd(Feature end)
      Returns the other end of the binary type owning the given end feature.
      Parameters:
      end - the end feature
      Returns:
      the opposite end
    • isAssociationOrConnector

      public static boolean isAssociationOrConnector(@CheckForNull Element element)
      Checks whether the element is an association or connector.
      Parameters:
      element - the element
      Returns:
      true if association or connector
    • isEnd

      public static boolean isEnd(Element element)
      Checks whether the element is an end feature.
      Parameters:
      element - the element
      Returns:
      true if the element is a feature marked as an end