Class FeatureTypings
java.lang.Object
com.dassault_systemes.modeler.kerml.model.FeatureTypings
Utility class to work with
FeatureTyping-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdds a single type to the feature.static voidAdds multiple types to the feature.static voidforEachOwnedType(Feature feature, Consumer<Type> typeConsumer) Iterates over all owned types of the feature.static TypegetFirstType(Feature feature) Returns the first type of the feature.static <T> TgetFirstType(Feature feature, Class<T> kind) Returns the first type of the feature matching the given class.getOwnedNotImpliedTypes(Feature feature) Returns all owned, non‑implied types of the feature.getOwnedTypes(Feature feature) Returns all owned types of the feature.static voidSets the type of the feature to the given single type.static voidSets the types of the feature to the given list of types.static Stream<FeatureTyping> Returns a stream of owned, non‑implied FeatureTyping relationships.streamOfOwnedNotImpliedTypes(Feature feature) Returns a stream of owned, non‑implied types of the feature.
-
Constructor Details
-
FeatureTypings
public FeatureTypings()
-
-
Method Details
-
setType
Sets the type of the feature to the given single type.- Parameters:
feature- the featuretype- the type to assign, or null
-
setType
Sets the types of the feature to the given list of types. Replaces existing owned, non‑implied FeatureTyping relationships.- Parameters:
feature- the featuretypes- list of types
-
addType
Adds a single type to the feature.- Parameters:
feature- the featuretype- the type to add
-
addType
Adds multiple types to the feature.- Parameters:
feature- the featuretypes- list of types to add
-
getFirstType
Returns the first type of the feature matching the given class.- Type Parameters:
T- type parameter- Parameters:
feature- the featurekind- expected type class- Returns:
- first matching type, or null
-
getFirstType
Returns the first type of the feature.- Parameters:
feature- the feature- Returns:
- first type, or null
-
getOwnedNotImpliedTypes
Returns all owned, non‑implied types of the feature.- Parameters:
feature- the feature- Returns:
- list of owned, non‑implied types
-
streamOfOwnedNotImpliedTypes
Returns a stream of owned, non‑implied types of the feature.- Parameters:
feature- the feature- Returns:
- stream of types
-
streamOfOwnedNotImpliedFeatureTyping
Returns a stream of owned, non‑implied FeatureTyping relationships.- Parameters:
feature- the feature- Returns:
- stream of FeatureTyping relationships
-
getOwnedTypes
Returns all owned types of the feature.- Parameters:
feature- the feature- Returns:
- list of owned types
-
forEachOwnedType
Iterates over all owned types of the feature. Uses index‑based iteration to avoid concurrent modification during name resolution.- Parameters:
feature- the featuretypeConsumer- consumer receiving each owned type
-