Class GenericString

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.ShallowCopySupporter<adams.core.discovery.AbstractDiscoveryHandler>, adams.core.SizeOfHandler, Serializable

    public class GenericString
    extends adams.core.discovery.genetic.AbstractGeneticStringDiscoveryHandler
    Generic handler for string properties.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Class m_ActualClass
      the actual class.
      protected adams.core.base.BaseClassname m_Classname
      the class name.
      protected String m_Property
      the property name.
      protected PropertyDescriptor m_PropertyDescriptor
      the property descriptor.
      • Fields inherited from class adams.core.discovery.genetic.AbstractGeneticStringDiscoveryHandler

        m_List
      • 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
      GenericString()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String classnameTipText()
      Returns the tip text for this property.
      void defineOptions()
      Adds options to the internal list of options.
      protected Class getActualClass()
      Returns the class that is being handled.
      adams.core.base.BaseClassname getClassname()
      Returns the classname to be the handler for.
      protected adams.core.base.BaseClassname getDefaultClassname()
      Returns the default classname.
      protected String getDefaultList()
      Returns the default list.
      protected String getDefaultProperty()
      Returns the default property.
      String getProperty()
      Returns the property to manage.
      protected PropertyDescriptor getPropertyDescriptor()
      Returns the property descriptor for the handled property.
      protected String getValue​(adams.core.discovery.PropertyPath.PropertyContainer cont)
      Returns the string value from the property container.
      String globalInfo()
      Returns a string describing the object.
      protected boolean handles​(Object obj)
      Checks whether this object is handled by this discovery handler.
      String propertyTipText()
      Returns the tip text for this property.
      protected void reset()  
      void setClassname​(adams.core.base.BaseClassname value)
      Sets the classname to be the handler for.
      void setProperty​(String value)
      Sets the property to manage.
      protected void setValue​(adams.core.discovery.PropertyPath.PropertyContainer cont, String value)
      Sets the string value in the property container.
      • Methods inherited from class adams.core.discovery.genetic.AbstractGeneticStringDiscoveryHandler

        calcNumBits, doPack, doUnpack, getList, getNumBits, listTipText, setList
      • 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 interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
    • Field Detail

      • m_Classname

        protected adams.core.base.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.
    • Constructor Detail

      • GenericString

        public GenericString()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.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:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.core.discovery.genetic.AbstractGeneticStringDiscoveryHandler
      • reset

        protected void reset()
        Overrides:
        reset in class adams.core.discovery.AbstractDiscoveryHandler
      • getDefaultList

        protected String getDefaultList()
        Returns the default list.
        Specified by:
        getDefaultList in class adams.core.discovery.genetic.AbstractGeneticStringDiscoveryHandler
        Returns:
        the default
      • getDefaultClassname

        protected adams.core.base.BaseClassname getDefaultClassname()
        Returns the default classname.
        Returns:
        the default
      • setClassname

        public void setClassname​(adams.core.base.BaseClassname value)
        Sets the classname to be the handler for.
        Parameters:
        value - the classname
      • getClassname

        public adams.core.base.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 String getValue​(adams.core.discovery.PropertyPath.PropertyContainer cont)
        Returns the string value from the property container.
        Specified by:
        getValue in class adams.core.discovery.genetic.AbstractGeneticStringDiscoveryHandler
        Parameters:
        cont - the container
        Returns:
        the value
      • setValue

        protected void setValue​(adams.core.discovery.PropertyPath.PropertyContainer cont,
                                String value)
        Sets the string value in the property container.
        Specified by:
        setValue in class adams.core.discovery.genetic.AbstractGeneticStringDiscoveryHandler
        Parameters:
        cont - the container
        value - the value to set
      • handles

        protected boolean handles​(Object obj)
        Checks whether this object is handled by this discovery handler.
        Specified by:
        handles in class adams.core.discovery.AbstractDiscoveryHandler
        Parameters:
        obj - the object to check
        Returns:
        true if handled