Class FileChanged

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<BooleanCondition>, SizeOfHandler, Stoppable, BooleanCondition, Serializable

    public class FileChanged
    extends AbstractBooleanCondition
    Evaluates to 'true' if the file change monitor detects a change.
    If a filename generator other than adams.core.io.NullFilenameGenerator is specified, then this takes precedence over the supplied filename (uses the token passing through).

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
        min-user-mode: Expert
     
    -file <adams.core.io.PlaceholderFile> (property: file)
        The file to check.
        default: ${CWD}
     
    -generator <adams.core.io.AbstractFilenameGenerator> (property: generator)
        The generator to use for generating the filename; uses the token passing
        through.
        default: adams.core.io.NullFilenameGenerator
     
    -check <adams.core.io.filechanged.FileChangeMonitor> (property: check)
        The file changed monitor to use.
        default: adams.core.io.filechanged.NoChange
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • FileChanged

        public FileChanged()
    • Method Detail

      • setFile

        public void setFile​(PlaceholderFile value)
        Sets the file to check.
        Parameters:
        value - the file
      • getFile

        public PlaceholderFile getFile()
        Returns the file to check.
        Returns:
        the file
      • fileTipText

        public String fileTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • generatorTipText

        public String generatorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setCheck

        public void setCheck​(FileChangeMonitor value)
        Sets the 'file changed' check scheme.
        Parameters:
        value - the check scheme
      • getCheck

        public FileChangeMonitor getCheck()
        Returns the 'file changed' check scheme.
        Returns:
        the check scheme
      • checkTipText

        public String checkTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • doEvaluate

        protected boolean doEvaluate​(Actor owner,
                                     Token token)
        Performs the actual evaluation.
        Specified by:
        doEvaluate in class AbstractBooleanCondition
        Parameters:
        owner - the owning actor
        token - the current token passing through
        Returns:
        the result of the evaluation