Class FeatureTypings

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

@OpenApiAll public class FeatureTypings extends Object
Utility class to work with FeatureTyping
  • Constructor Details

    • FeatureTypings

      public FeatureTypings()
  • Method Details

    • setType

      public static void setType(Feature feature, @CheckForNull Type type)
      Sets the type of the feature to the given single type.
      Parameters:
      feature - the feature
      type - the type to assign, or null
    • setType

      public static void setType(Feature feature, List<? extends Type> types)
      Sets the types of the feature to the given list of types. Replaces existing owned, non‑implied FeatureTyping relationships.
      Parameters:
      feature - the feature
      types - list of types
    • addType

      public static void addType(Feature feature, Type type)
      Adds a single type to the feature.
      Parameters:
      feature - the feature
      type - the type to add
    • addType

      public static void addType(Feature feature, List<? extends Type> types)
      Adds multiple types to the feature.
      Parameters:
      feature - the feature
      types - list of types to add
    • getFirstType

      @CheckForNull public static <T> T getFirstType(Feature feature, Class<T> kind)
      Returns the first type of the feature matching the given class.
      Type Parameters:
      T - type parameter
      Parameters:
      feature - the feature
      kind - expected type class
      Returns:
      first matching type, or null
    • getFirstType

      @CheckForNull public static Type getFirstType(Feature feature)
      Returns the first type of the feature.
      Parameters:
      feature - the feature
      Returns:
      first type, or null
    • getOwnedNotImpliedTypes

      public static List<Type> getOwnedNotImpliedTypes(Feature feature)
      Returns all owned, non‑implied types of the feature.
      Parameters:
      feature - the feature
      Returns:
      list of owned, non‑implied types
    • streamOfOwnedNotImpliedTypes

      public static Stream<Type> streamOfOwnedNotImpliedTypes(Feature feature)
      Returns a stream of owned, non‑implied types of the feature.
      Parameters:
      feature - the feature
      Returns:
      stream of types
    • streamOfOwnedNotImpliedFeatureTyping

      public static Stream<FeatureTyping> streamOfOwnedNotImpliedFeatureTyping(Feature feature)
      Returns a stream of owned, non‑implied FeatureTyping relationships.
      Parameters:
      feature - the feature
      Returns:
      stream of FeatureTyping relationships
    • getOwnedTypes

      public static List<Type> getOwnedTypes(Feature feature)
      Returns all owned types of the feature.
      Parameters:
      feature - the feature
      Returns:
      list of owned types
    • forEachOwnedType

      public static void forEachOwnedType(Feature feature, Consumer<Type> typeConsumer)
      Iterates over all owned types of the feature. Uses index‑based iteration to avoid concurrent modification during name resolution.
      Parameters:
      feature - the feature
      typeConsumer - consumer receiving each owned type