Package adams.core.discovery.genetic
Class GenericInteger
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<AbstractDiscoveryHandler>,SizeOfHandler,Serializable
public class GenericInteger extends AbstractGeneticIntegerDiscoveryHandler
Generic handler for integer properties.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Classm_ActualClassthe actual class.protected BaseClassnamem_Classnamethe class name.protected Stringm_Propertythe property name.protected PropertyDescriptorm_PropertyDescriptorthe property descriptor.-
Fields inherited from class adams.core.discovery.genetic.AbstractGeneticIntegerDiscoveryHandler
m_List, m_Maximum, m_Minimum, m_Type
-
Fields inherited from class adams.core.discovery.AbstractDiscoveryHandler
m_Containers, m_InvertMatching, m_RegExp
-
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 GenericInteger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringclassnameTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected ClassgetActualClass()Returns the class that is being handled.BaseClassnamegetClassname()Returns the classname to be the handler for.protected BaseClassnamegetDefaultClassname()Returns the default classname.protected StringgetDefaultList()Returns the default list.protected intgetDefaultMaximum()Returns the default maximum.protected intgetDefaultMinimum()Returns the default minimum.protected StringgetDefaultProperty()Returns the default property.StringgetProperty()Returns the property to manage.protected PropertyDescriptorgetPropertyDescriptor()Returns the property descriptor for the handled property.protected intgetValue(PropertyPath.PropertyContainer cont)Returns the double value from the property container.StringglobalInfo()Returns a string describing the object.protected booleanhandles(Object obj)Checks whether this object is handled by this discovery handler.StringpropertyTipText()Returns the tip text for this property.protected voidreset()Resets the handler.voidsetClassname(BaseClassname value)Sets the classname to be the handler for.voidsetProperty(String value)Sets the property to manage.protected voidsetValue(PropertyPath.PropertyContainer cont, int value)Sets the double value in the property container.-
Methods inherited from class adams.core.discovery.genetic.AbstractGeneticIntegerDiscoveryHandler
calcNumBits, doPack, doUnpack, getDefaultType, getList, getMaximum, getMinimum, getNumBits, getType, listTipText, maximumTipText, minimumTipText, setList, setMaximum, setMinimum, setType, typeTipText
-
Methods inherited from class adams.core.discovery.genetic.AbstractGeneticDiscoveryHandler
pack, performInitialization, requiresInitialization, unpack
-
Methods inherited from class adams.core.discovery.AbstractDiscoveryHandler
addContainer, getContainers, getInvertMatching, getRegExp, handles, invertMatchingTipText, regExpTipText, setInvertMatching, setRegExp, shallowCopy, shallowCopy, toString
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine
-
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_Classname
protected BaseClassname m_Classname
the class name.
-
m_ActualClass
protected transient Class m_ActualClass
the actual class.
-
m_Property
protected String m_Property
the property name.
-
m_PropertyDescriptor
protected transient PropertyDescriptor m_PropertyDescriptor
the property descriptor.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractGeneticIntegerDiscoveryHandler
-
reset
protected void reset()
Description copied from class:AbstractDiscoveryHandlerResets the handler.- Overrides:
resetin classAbstractDiscoveryHandler
-
getDefaultMinimum
protected int getDefaultMinimum()
Returns the default minimum.- Specified by:
getDefaultMinimumin classAbstractGeneticIntegerDiscoveryHandler- Returns:
- the default
-
getDefaultMaximum
protected int getDefaultMaximum()
Returns the default maximum.- Specified by:
getDefaultMaximumin classAbstractGeneticIntegerDiscoveryHandler- Returns:
- the default
-
getDefaultList
protected String getDefaultList()
Returns the default list.- Specified by:
getDefaultListin classAbstractGeneticIntegerDiscoveryHandler- Returns:
- the default
-
getDefaultClassname
protected BaseClassname getDefaultClassname()
Returns the default classname.- Returns:
- the default
-
setClassname
public void setClassname(BaseClassname value)
Sets the classname to be the handler for.- Parameters:
value- the classname
-
getClassname
public BaseClassname getClassname()
Returns the classname to be the handler for.- Returns:
- the classname
-
classnameTipText
public String classnameTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultProperty
protected String getDefaultProperty()
Returns the default property.- Returns:
- the default
-
setProperty
public void setProperty(String value)
Sets the property to manage.- Parameters:
value- the property
-
getProperty
public String getProperty()
Returns the property to manage.- Returns:
- the property
-
propertyTipText
public String propertyTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getActualClass
protected Class getActualClass()
Returns the class that is being handled.- Returns:
- the class
- Throws:
IllegalStateException- if no valid classname provided
-
getPropertyDescriptor
protected PropertyDescriptor getPropertyDescriptor()
Returns the property descriptor for the handled property.- Returns:
- the descriptor
- Throws:
IllegalStateException- if introspection fails
-
getValue
protected int getValue(PropertyPath.PropertyContainer cont)
Returns the double value from the property container.- Specified by:
getValuein classAbstractGeneticIntegerDiscoveryHandler- Parameters:
cont- the container- Returns:
- the value
-
setValue
protected void setValue(PropertyPath.PropertyContainer cont, int value)
Sets the double value in the property container.- Specified by:
setValuein classAbstractGeneticIntegerDiscoveryHandler- Parameters:
cont- the containervalue- the value to set
-
handles
protected boolean handles(Object obj)
Checks whether this object is handled by this discovery handler.- Specified by:
handlesin classAbstractDiscoveryHandler- Parameters:
obj- the object to check- Returns:
- true if handled
-
-