Class Utils
- java.lang.Object
-
- fi.tut.mei.matchmaking.matching_ws.rest.util.Utils
-
public class Utils extends Object
Janaka Nawagamuwa created on 18/10/2021
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
deepCopyJAXB(T object, Class<T> clazz)
This utility function created to clone the result model.static void
retainMatchIDs(MatchmakingResult mmResult, List<String> retainingIDs)
Utility function to remove the match IDs that has not been mentioned in the retainingIDs list
-
-
-
Method Detail
-
deepCopyJAXB
public static <T> T deepCopyJAXB(T object, Class<T> clazz)
This utility function created to clone the result model. Because, the generated models are not extending clonable interface and it is not possible to use object.clone() to clone the result.- Type Parameters:
T
-- Parameters:
object
-clazz
-- Returns:
-
retainMatchIDs
public static void retainMatchIDs(MatchmakingResult mmResult, List<String> retainingIDs)
Utility function to remove the match IDs that has not been mentioned in the retainingIDs list- Parameters:
mmResult
-retainingIDs
-
-
-