Class AbstractIndexedSplitsRunsEvaluation<I,O>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.indexedsplitsrunsevaluation.AbstractIndexedSplitsRunsEvaluation<I,O>
-
- Type Parameters:
I- the accepted input dataO- the generated output data
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,Stoppable,StoppableWithFeedback,FlowContextHandler,IndexedSplitsRunsEvaluation<I,O>,Serializable
- Direct Known Subclasses:
InstancesIndexedSplitsRunsEvaluation,NullEvaluation
public abstract class AbstractIndexedSplitsRunsEvaluation<I,O> extends AbstractOptionHandler implements IndexedSplitsRunsEvaluation<I,O>
Ancestor for performing evaluations on indexed splits runs.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Actorm_FlowContextthe flow context.protected booleanm_Stoppedwhether the evaluation was stopped.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractIndexedSplitsRunsEvaluation()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Stringcheck(I data, IndexedSplitsRuns runs)For checking the data.protected abstract OdoEvaluate(I data, IndexedSplitsRuns runs, MessageCollection errors)Performs an evaluation by applying the indexed splits runs to the data.Oevaluate(I data, IndexedSplitsRuns runs, MessageCollection errors)Performs an evaluation by applying the indexed splits runs to the data.ActorgetFlowContext()Returns the flow context, if any.StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.booleanisStopped()Whether the execution has been stopped.abstract booleanrequiresFlowContext()Returns whether flow context is actually required.voidsetFlowContext(Actor value)Sets the flow context.voidstopExecution()Stops the execution.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.flow.transformer.indexedsplitsrunsevaluation.IndexedSplitsRunsEvaluation
accepts, generates
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_FlowContext
protected Actor m_FlowContext
the flow context.
-
m_Stopped
protected boolean m_Stopped
whether the evaluation was stopped.
-
-
Method Detail
-
setFlowContext
public void setFlowContext(Actor value)
Sets the flow context.- Specified by:
setFlowContextin interfaceFlowContextHandler- Parameters:
value- the actor
-
getFlowContext
public Actor getFlowContext()
Returns the flow context, if any.- Specified by:
getFlowContextin interfaceFlowContextHandler- Returns:
- the actor, null if none available
-
requiresFlowContext
public abstract boolean requiresFlowContext()
Returns whether flow context is actually required.- Returns:
- true if required
-
stopExecution
public void stopExecution()
Stops the execution.- Specified by:
stopExecutionin interfaceStoppable
-
isStopped
public boolean isStopped()
Whether the execution has been stopped.- Specified by:
isStoppedin interfaceStoppableWithFeedback- Returns:
- true if stopped
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.
The default implementation returns null.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Returns:
- null if no info available, otherwise short string
-
check
public String check(I data, IndexedSplitsRuns runs)
For checking the data.- Parameters:
data- the data to use for evaluationruns- the indexed splits to use- Returns:
- null if passed checks, otherwise error message
-
doEvaluate
protected abstract O doEvaluate(I data, IndexedSplitsRuns runs, MessageCollection errors)
Performs an evaluation by applying the indexed splits runs to the data.- Parameters:
data- the data to use for evaluationruns- the indexed splits to useerrors- for collecting errors- Returns:
- the generated evaluations, null in case of error
-
evaluate
public O evaluate(I data, IndexedSplitsRuns runs, MessageCollection errors)
Performs an evaluation by applying the indexed splits runs to the data.- Specified by:
evaluatein interfaceIndexedSplitsRunsEvaluation<I,O>- Parameters:
data- the data to use for evaluationruns- the indexed splits to useerrors- for collecting errors- Returns:
- the generated evaluations, null in case of error
-
-