Package dev.zemco.codegame.problems
Class ProblemCaseMemorySettings
java.lang.Object
dev.zemco.codegame.problems.ProblemCaseMemorySettings
Problem cases memory settings contains memory settings, which are used to configure execution memory
during validation of player's solution.
Each memory configuration contains
size of the memory,
and initial values.
Memory settings are immutable, and may be deserialized from JSON thanks to bindings from Jackson library.
- Author:
- Erik Zemčík
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionProblemCaseMemorySettings(int size, Map<Integer, Integer> initialValues) Creates an instance ofProblemCaseMemorySettings. -
Method Summary
Modifier and TypeMethodDescriptionReturns initial values of the memory used during the evaluation of player's solution.intgetSize()Returns size of the memory used during the evaluation of player's solution.
-
Constructor Details
-
ProblemCaseMemorySettings
Creates an instance ofProblemCaseMemorySettings.- Parameters:
size- size of the memoryinitialValues- initial values of the memory- Throws:
IllegalArgumentException- ifsizeis not a positive integer
-
-
Method Details
-
getSize
public int getSize()Returns size of the memory used during the evaluation of player's solution.- Returns:
- size of the memory
-
getInitialValues
Returns initial values of the memory used during the evaluation of player's solution.- Returns:
- unmodifiable
mapof the initial values of the memory
-