Package dev.zemco.codegame.execution
Class ImmutableExecutionContext
java.lang.Object
dev.zemco.codegame.execution.ImmutableExecutionContext
- All Implemented Interfaces:
IExecutionContext
Implementation of the
execution context, where individual components cannot be
changed during the execution.- Author:
- Erik Zemčík
-
Constructor Summary
ConstructorsConstructorDescriptionImmutableExecutionContext(IExecutionEngine engine, IMemory memory, IInputSource inputSource, IOutputSink outputSink) Creates an instance ofImmutableExecutionContext, which holds the provided components. -
Method Summary
Modifier and TypeMethodDescriptionReturns the execution engine of the execution.Returns the input source of the execution.Returns the memory of the execution.Returns the output sink of the execution.
-
Constructor Details
-
ImmutableExecutionContext
public ImmutableExecutionContext(IExecutionEngine engine, IMemory memory, IInputSource inputSource, IOutputSink outputSink) Creates an instance ofImmutableExecutionContext, which holds the provided components.- Parameters:
engine- engine of the executionmemory- memory of the executioninputSource- input source of the executionoutputSink- output sink of the execution- Throws:
IllegalArgumentException- if any parameter isnull
-
-
Method Details
-
getExecutionEngine
Description copied from interface:IExecutionContextReturns the execution engine of the execution.- Specified by:
getExecutionEnginein interfaceIExecutionContext- Returns:
- execution engine
-
getMemory
Description copied from interface:IExecutionContextReturns the memory of the execution.- Specified by:
getMemoryin interfaceIExecutionContext- Returns:
- memory
-
getInputSource
Description copied from interface:IExecutionContextReturns the input source of the execution.- Specified by:
getInputSourcein interfaceIExecutionContext- Returns:
- input source
-
getOutputSink
Description copied from interface:IExecutionContextReturns the output sink of the execution.- Specified by:
getOutputSinkin interfaceIExecutionContext- Returns:
- output sink
-