Package adams.data.djl.idgenerator
Class StringExpressionID
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.djl.idgenerator.AbstractIDGenerator
-
- adams.data.djl.idgenerator.StringExpressionID
-
- All Implemented Interfaces:
adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.QuickInfoSupporter,adams.core.SizeOfHandler,IDGenerator,adams.flow.core.FlowContextHandler,Serializable
public class StringExpressionID extends AbstractIDGenerator
Expands any variables in the supplied string expression, evaluates it and returns the result as ID.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.parser.StringExpressionTextm_IDthe expression to use as ID.-
Fields inherited from class adams.data.djl.idgenerator.AbstractIDGenerator
m_FlowContext
-
-
Constructor Summary
Constructors Constructor Description StringExpressionID()Default constructor.StringExpressionID(adams.parser.StringExpressionText id)Initializes the generator with the specified ID.StringExpressionID(String id)Initializes the generator with the specified ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.Stringgenerate()Generates the ID.adams.parser.StringExpressionTextgetID()Gets the ID.StringglobalInfo()Returns a string describing the object.StringIDTipText()Returns the tip text for this property.protected booleanrequiresFlowContext()Returns whether flow context is required.voidsetID(adams.parser.StringExpressionText value)Sets the ID.-
Methods inherited from class adams.data.djl.idgenerator.AbstractIDGenerator
getFlowContext, getQuickInfo, setFlowContext
-
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
-
-
-
-
Constructor Detail
-
StringExpressionID
public StringExpressionID()
Default constructor.
-
StringExpressionID
public StringExpressionID(String id)
Initializes the generator with the specified ID.- Parameters:
id- the ID to use
-
StringExpressionID
public StringExpressionID(adams.parser.StringExpressionText id)
Initializes the generator with the specified ID.- Parameters:
id- the ID to use
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.core.option.AbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.core.option.AbstractOptionHandler
-
setID
public void setID(adams.parser.StringExpressionText value)
Sets the ID.- Parameters:
value- the ID
-
getID
public adams.parser.StringExpressionText getID()
Gets the ID.- Returns:
- the ID
-
IDTipText
public String IDTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
requiresFlowContext
protected boolean requiresFlowContext()
Returns whether flow context is required.- Overrides:
requiresFlowContextin classAbstractIDGenerator- Returns:
- true if required
-
generate
public String generate()
Generates the ID.- Returns:
- the ID
-
-