Class EMFHelper
java.lang.Object
org.palladiosimulator.analyzer.quality.util.EMFHelper
Class with helper function for EMF processing.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
getFirstObjectByType
(List<?> collection, Class<T> c) Gets the first object of a given type from a list.static <T> List<T>
getObjectsByType
(List<?> collection, Class<T> c) Gets all objects of a given type from a list.
-
Constructor Details
-
EMFHelper
public EMFHelper()
-
-
Method Details
-
getFirstObjectByType
Gets the first object of a given type from a list.- Type Parameters:
T
- Type of the Object.- Parameters:
collection
- List of objects.c
- Class of the requested object.- Returns:
- The first object in the list of the given type.
-
getObjectsByType
Gets all objects of a given type from a list.- Type Parameters:
T
- Type of the Object.- Parameters:
collection
- List of objects.c
- Class of the requested object.- Returns:
- The first object in the list of the given type.
-