java.lang.Object
com.dassault_systemes.modeler.sysml.model.Variants

@OpenApiAll public class Variants extends Object
Utility class providing helper methods for working with Variants
  • Constructor Details

    • Variants

      public Variants()
  • Method Details

    • isVariation

      public static boolean isVariation(Type type)
      Checks whether the given type represents a variation. A type is considered a variation if it is a Usage or Definition whose isVariation flag is set.
      Parameters:
      type - the type to check
      Returns:
      true if the type is a variation
    • getOwningVariation

      @CheckForNull public static Type getOwningVariation(Usage usage)
      Returns the type that owns the variation membership of the given usage, if any.
      Parameters:
      usage - the usage whose owning variation is requested
      Returns:
      owning variation type, or null if none exists
    • getOwningVariation

      @CheckForNull public static Type getOwningVariation(@CheckForNull OwningMembership membership)
      Returns the type that owns the given variation membership. A variation is owned when the membership is a VariantMembership whose owning namespace is a Type.
      Parameters:
      membership - the owning membership
      Returns:
      owning variation type, or null if none exists