Class EMFHelper
- java.lang.Object
-
- org.palladiosimulator.analyzer.quality.util.EMFHelper
-
public class EMFHelper extends Object
Class with helper function for EMF processing.
-
-
Constructor Summary
Constructors Constructor Description EMFHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <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.
-
-
-
Method Detail
-
getFirstObjectByType
public static <T> T getFirstObjectByType(List<?> collection, Class<T> c)
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
public static <T> List<T> getObjectsByType(List<?> collection, Class<T> c)
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.
-
-