Package adams.core.io.filechanged
Class Size
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,FileChangeMonitor
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Serializable
public class Size extends AbstractFileChangeMonitor
Uses the file size.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected long
m_Size
the size.-
Fields inherited from class adams.core.io.filechanged.AbstractFileChangeMonitor
m_File, m_Initialized
-
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 Size()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkChange(File file)
Performs the actual check whether the file has changed.protected String
doInitialize(File file)
Performs the actual initialization of the monitor with the specified file.protected String
doUpdate(File file)
Performs the actual updating of the monitor with the specified file.String
globalInfo()
Returns a string describing the object.protected void
reset()
Resets the scheme.-
Methods inherited from class adams.core.io.filechanged.AbstractFileChangeMonitor
checkFile, getMonitoredFile, getQuickInfo, hasChanged, initialize, isInitialized, update
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, 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
-
-
-
-
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
-
reset
protected void reset()
Resets the scheme.- Overrides:
reset
in classAbstractFileChangeMonitor
-
doInitialize
protected String doInitialize(File file)
Performs the actual initialization of the monitor with the specified file.- Specified by:
doInitialize
in classAbstractFileChangeMonitor
- Parameters:
file
- the file to initialize with- Returns:
- null if successful, otherwise error message
-
checkChange
protected boolean checkChange(File file)
Performs the actual check whether the file has changed.- Specified by:
checkChange
in classAbstractFileChangeMonitor
- Parameters:
file
- the file to check- Returns:
- true if changed
-
doUpdate
protected String doUpdate(File file)
Performs the actual updating of the monitor with the specified file.- Specified by:
doUpdate
in classAbstractFileChangeMonitor
- Parameters:
file
- the file to update with- Returns:
- null if successful, otherwise error message
-
-