Package adams.data.compare
Class DataContainer
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Serializable
public class DataContainer extends AbstractObjectCompare<DataContainer,Integer>
Compares adams.data.container.DataContainer objects (header, data or both) and returns the result of that comparison.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-type <ALL|HEADER|DATA> (property: type) The type of comparison to perform. default: ALL
- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DataContainer.ComparisonType
The type of comparison.
-
Field Summary
Fields Modifier and Type Field Description protected DataContainer.ComparisonType
m_Type
the type of comparison.-
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 DataContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]
accepts()
Returns the classes that it can handle.void
defineOptions()
Adds options to the internal list of options.protected Integer
doCompareObjects(DataContainer o1, DataContainer o2)
Performs the actual comparison of the two objects.Class
generates()
Returns the type of output that it generates.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.DataContainer.ComparisonType
getType()
Returns the type of comparison to perform.String
globalInfo()
Returns a string describing the object.void
setType(DataContainer.ComparisonType value)
Sets the type of comparison to perform.String
typeTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.compare.AbstractObjectCompare
check, compareObjects
-
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_Type
protected DataContainer.ComparisonType m_Type
the type of comparison.
-
-
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
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setType
public void setType(DataContainer.ComparisonType value)
Sets the type of comparison to perform.- Parameters:
value
- the type
-
getType
public DataContainer.ComparisonType getType()
Returns the type of comparison to perform.- Returns:
- the type
-
typeTipText
public String typeTipText()
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 classes that it can handle.- Specified by:
accepts
in classAbstractObjectCompare<DataContainer,Integer>
- Returns:
- the array of classes
-
generates
public Class generates()
Returns the type of output that it generates.- Specified by:
generates
in classAbstractObjectCompare<DataContainer,Integer>
- Returns:
- the class of the output
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.
Default implementation returns null.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractObjectCompare<DataContainer,Integer>
- Returns:
- null if no info available, otherwise short string
-
doCompareObjects
protected Integer doCompareObjects(DataContainer o1, DataContainer o2)
Performs the actual comparison of the two objects.- Specified by:
doCompareObjects
in classAbstractObjectCompare<DataContainer,Integer>
- Parameters:
o1
- the first objecto2
- the second object- Returns:
- the result of the comparison
-
-