Class OptionHandlerPropertyExtractor
- java.lang.Object
-
- adams.gui.visualization.debug.propertyextractor.AbstractPropertyExtractor
-
- adams.gui.visualization.debug.propertyextractor.OptionHandlerPropertyExtractor
-
- All Implemented Interfaces:
CleanUpHandler
public class OptionHandlerPropertyExtractor extends AbstractPropertyExtractor
Extractor for objects supporting theOptionHandler
interface.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected List<AbstractOption>
m_Options
Stores the options.-
Fields inherited from class adams.gui.visualization.debug.propertyextractor.AbstractPropertyExtractor
m_Cache, m_Current, m_ExtractorClasses, m_Extractors
-
-
Constructor Summary
Constructors Constructor Description OptionHandlerPropertyExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Cleans up data structures, frees up memory.String
getLabel(int index)
Returns the label for the specified property.Object
getValue(int index)
Returns the current value of the specified property.boolean
handles(Class cls)
Checks whether this extractor actually handles this type of class.protected void
initialize()
Initializes the extractor.int
size()
The number of properties that are available.-
Methods inherited from class adams.gui.visualization.debug.propertyextractor.AbstractPropertyExtractor
getCurrent, getExtractor, getExtractor, getExtractors, getExtractors, hasValue, initExtractors, setCurrent
-
-
-
-
Field Detail
-
m_Options
protected List<AbstractOption> m_Options
Stores the options.
-
-
Method Detail
-
handles
public boolean handles(Class cls)
Checks whether this extractor actually handles this type of class.- Specified by:
handles
in classAbstractPropertyExtractor
- Parameters:
cls
- the class to check- Returns:
- true if the extractor handles the object/class
-
initialize
protected void initialize()
Initializes the extractor.- Overrides:
initialize
in classAbstractPropertyExtractor
-
size
public int size()
The number of properties that are available.- Specified by:
size
in classAbstractPropertyExtractor
- Returns:
- the number of properties
-
getValue
public Object getValue(int index)
Returns the current value of the specified property.- Specified by:
getValue
in classAbstractPropertyExtractor
- Parameters:
index
- the index of the property to retrieve- Returns:
- the current value of the property
-
getLabel
public String getLabel(int index)
Returns the label for the specified property.- Specified by:
getLabel
in classAbstractPropertyExtractor
- Parameters:
index
- the index of the property to get the label for- Returns:
- the label for the property
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUp
in interfaceCleanUpHandler
- Overrides:
cleanUp
in classAbstractPropertyExtractor
-
-