Package adams.flow.template
Class ProgressInConsole
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.template.AbstractActorTemplate
-
- adams.flow.template.ProgressInConsole
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractActorTemplate>
,SizeOfHandler
,Serializable
public class ProgressInConsole extends AbstractActorTemplate
Generates a sub-flow that outputs the token count every X number of tokens, with X being the interval supplied to this template.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-name <java.lang.String> (property: name) The new name for the actor; leave empty to use current. default:
-interval <int> (property: interval) The interval for the progress info. default: 100 minimum: 1
-prefix <java.lang.String> (property: prefix) The prefix to use in the console. default: # of tokens:
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_Interval
the interval.protected String
m_Prefix
the prefix.-
Fields inherited from class adams.flow.template.AbstractActorTemplate
m_Name
-
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 ProgressInConsole()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected Actor
doGenerate()
Generates the actor.int
getInterval()
Returns the interval for the output.String
getPrefix()
Returns the prefix for the output.String
globalInfo()
Returns a string describing the object.String
intervalTipText()
Returns the tip text for this property.boolean
isInteractive()
Whether the flow generated is an interactive one.String
prefixTipText()
Returns the tip text for this property.void
setInterval(int value)
Sets the interval for the output.void
setPrefix(String value)
Sets the prefix for the output.-
Methods inherited from class adams.flow.template.AbstractActorTemplate
compareTo, equals, forCommandLine, forName, generate, getBaselineCorrections, getDefaultName, getName, nameTipText, postGenerate, preGenerate, setName, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Interval
protected int m_Interval
the interval.
-
m_Prefix
protected String m_Prefix
the prefix.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractActorTemplate
-
setInterval
public void setInterval(int value)
Sets the interval for the output.- Parameters:
value
- the interval
-
getInterval
public int getInterval()
Returns the interval for the output.- Returns:
- the interval
-
intervalTipText
public String intervalTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setPrefix
public void setPrefix(String value)
Sets the prefix for the output.- Parameters:
value
- the prefix
-
getPrefix
public String getPrefix()
Returns the prefix for the output.- Returns:
- the prefix
-
prefixTipText
public String prefixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
isInteractive
public boolean isInteractive()
Whether the flow generated is an interactive one.- Specified by:
isInteractive
in classAbstractActorTemplate
- Returns:
- true if interactive
-
doGenerate
protected Actor doGenerate()
Generates the actor.- Specified by:
doGenerate
in classAbstractActorTemplate
- Returns:
- the generated acto
-
-