Package adams.flow.condition.bool
Class HashSet
-
- All Implemented Interfaces:
ClassCrossReference
,CrossReference
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,ShallowCopySupporter<BooleanCondition>
,SizeOfHandler
,Stoppable
,BooleanCondition
,Serializable
public class HashSet extends AbstractBooleanCondition implements ClassCrossReference
Evaluates to true if the payload of the current token or the specified string (if non-empty) is present in the specified hashset.
The value gets transformed using the specified conversion.
See also:
adams.flow.standalone.HashSetInit
adams.flow.transformer.HashSetInit
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-storage-name <adams.flow.control.StorageName> (property: storageName) The name of the hashset in the internal storage. default: hashset
-value <java.lang.String> (property: value) The value (if non-empty) to look for in the hashset, takes precedence of the token passing through. default:
-conversion <adams.data.conversion.Conversion> (property: conversion) The type of conversion to perform. default: adams.data.conversion.ObjectToObject
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Conversion
m_Conversion
the type of conversion.protected StorageName
m_StorageName
the name of the lookup table in the internal storage.protected String
m_Value
the value to check.-
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 HashSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]
accepts()
Returns the class that the consumer accepts.String
conversionTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected boolean
doEvaluate(Actor owner, Token token)
Performs the actual evaluation.Class[]
getClassCrossReferences()
Returns the cross-referenced classes.Conversion
getConversion()
Returns the type of conversion to perform.String
getQuickInfo()
Returns the quick info string to be displayed in the flow editor.StorageName
getStorageName()
Returns the name for the hashset in the internal storage.String
getValue()
Returns the (optional) value to look for in the hashset, takes precedence over the token passing through.String
globalInfo()
Returns a string describing the object.void
setConversion(Conversion value)
Sets the type of conversion to perform.void
setStorageName(StorageName value)
Sets the name for the hashset in the internal storage.void
setValue(String value)
Sets the (optional) value to look for in the hashset, takes precedence over the token passing through.String
storageNameTipText()
Returns the tip text for this property.String
valueTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.condition.bool.AbstractBooleanCondition
evaluate, preEvaluate, setUp, shallowCopy, shallowCopy, stopExecution
-
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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_StorageName
protected StorageName m_StorageName
the name of the lookup table in the internal storage.
-
m_Value
protected String m_Value
the value to check.
-
m_Conversion
protected Conversion m_Conversion
the type of conversion.
-
-
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
-
getClassCrossReferences
public Class[] getClassCrossReferences()
Returns the cross-referenced classes.- Specified by:
getClassCrossReferences
in interfaceClassCrossReference
- Returns:
- the classes
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
getQuickInfo
public String getQuickInfo()
Returns the quick info string to be displayed in the flow editor.- Specified by:
getQuickInfo
in interfaceBooleanCondition
- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Specified by:
getQuickInfo
in classAbstractBooleanCondition
- Returns:
- the info or null if no info to be displayed
-
setStorageName
public void setStorageName(StorageName value)
Sets the name for the hashset in the internal storage.- Parameters:
value
- the name
-
getStorageName
public StorageName getStorageName()
Returns the name for the hashset in the internal storage.- Returns:
- the name
-
storageNameTipText
public String storageNameTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setValue
public void setValue(String value)
Sets the (optional) value to look for in the hashset, takes precedence over the token passing through.- Parameters:
value
- the value
-
getValue
public String getValue()
Returns the (optional) value to look for in the hashset, takes precedence over the token passing through.- Returns:
- the value
-
valueTipText
public String valueTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setConversion
public void setConversion(Conversion value)
Sets the type of conversion to perform.- Parameters:
value
- the type of conversion
-
getConversion
public Conversion getConversion()
Returns the type of conversion to perform.- Returns:
- the type of conversion
-
conversionTipText
public String conversionTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
accepts
public Class[] accepts()
Returns the class that the consumer accepts.- Specified by:
accepts
in interfaceBooleanCondition
- Specified by:
accepts
in classAbstractBooleanCondition
- Returns:
- adams.flow.core.Unknown.class
-
doEvaluate
protected boolean doEvaluate(Actor owner, Token token)
Performs the actual evaluation.- Specified by:
doEvaluate
in classAbstractBooleanCondition
- Parameters:
owner
- the owning actortoken
- the current token passing through- Returns:
- the result of the evaluation
-
-