Class InputBound<T,S>
Object
org.anchoranalysis.experiment.task.InputBound<T,S>
- Type Parameters:
T- input-object typeS- shared-state type
public class InputBound<T,S> extends Object
Input for executing a task, associated with shared-state and other parameters.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description InputBound(T input, S sharedState, boolean detailedLogging, InputOutputContextStateful contextExperiment, InputOutputContextStateful contextJob) -
Method Summary
Modifier and Type Method Description <U> InputBound<U,S>changeInput(U inputToAssign)Copies the current instance but changes the input.<U, V> InputBound<U,V>changeInputAndSharedState(U inputToAssign, V sharedStateToAssign)Copies the current instance but changes both the input and shared-state.InitializationContextcreateInitializationContext()Creates anInitializationContextfrom the current instance.InputOutputContextStatefulgetContextExperiment()The input-output context associated with the current experiment.InputOutputContextStatefulgetContextJob()The input-output context associated with the current job.TgetInput()The input is bound.LoggergetLogger()TheLoggerassociated with this input, as it is being processed as a job.StatefulMessageLoggergetLogReporterJob()TheStatefulMessageLoggerassociated with the job thati s being processed.OutputtergetOutputter()TheOutputterassociated with this input, as it is being processed as a job.SgetSharedState()The state shared between inputs.TaskArgumentsgetTaskArguments()The arguments for the task that is being processed.booleanisDetailedLogging()Whether logging is more detailed (true) or less detailed (false).
-
Constructor Details
-
InputBound
public InputBound(T input, S sharedState, boolean detailedLogging, InputOutputContextStateful contextExperiment, InputOutputContextStateful contextJob)
-
-
Method Details
-
changeInput
Copies the current instance but changes the input.This an immutable operation that does not alter the existing instance.
- Type Parameters:
U- the type ofinputToAssign.- Parameters:
inputToAssign- the input in the copy, that replaces the existing input.- Returns:
- a copy of the current instance, except the input is replaced with
inputToAssign.
-
changeInputAndSharedState
Copies the current instance but changes both the input and shared-state.This an immutable operation that does not alter the existing instance.
- Type Parameters:
U- the type ofinputToAssign.V- the type ofsharedStateToAssign.- Parameters:
inputToAssign- the input in the copy, that replaces the existing input.sharedStateToAssign- the shared-state in the copy, that replaces the existing shared-state.- Returns:
- a copy of the current instance, except the input is replaced with
inputToAssign.
-
createInitializationContext
Creates anInitializationContextfrom the current instance.- Returns:
- a newly created
InitializationContext.
-
getOutputter
TheOutputterassociated with this input, as it is being processed as a job.- Returns:
- the outputter.
-
getLogger
TheLoggerassociated with this input, as it is being processed as a job.- Returns:
- the logger.
-
getLogReporterJob
TheStatefulMessageLoggerassociated with the job thati s being processed.- Returns:
- the logger.
-
getTaskArguments
The arguments for the task that is being processed.- Returns:
- the arguments.
-
getInput
The input is bound. * -
getSharedState
The state shared between inputs. -
isDetailedLogging
public boolean isDetailedLogging()Whether logging is more detailed (true) or less detailed (false). -
getContextExperiment
The input-output context associated with the current experiment. -
getContextJob
The input-output context associated with the current job.
-