Class VariablesPropertyExtractor
- java.lang.Object
-
- adams.gui.visualization.debug.propertyextractor.AbstractPropertyExtractor
-
- adams.gui.visualization.debug.propertyextractor.VariablesPropertyExtractor
-
- All Implemented Interfaces:
CleanUpHandler
public class VariablesPropertyExtractor extends AbstractPropertyExtractor
HandlesVariablesand derived classes, listing each variable as a separate property.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>m_Namesthe variable names.-
Fields inherited from class adams.gui.visualization.debug.propertyextractor.AbstractPropertyExtractor
m_Cache, m_Current, m_ExtractorClasses, m_Extractors
-
-
Constructor Summary
Constructors Constructor Description VariablesPropertyExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLabel(int index)Returns the label for the specified property.ObjectgetValue(int index)Returns the current value of the specified property.booleanhandles(Class cls)Checks whether this extractor actually handles this type of class.protected voidinitialize()Initializes the extractor.intsize()The number of properties that are available.-
Methods inherited from class adams.gui.visualization.debug.propertyextractor.AbstractPropertyExtractor
cleanUp, getCurrent, getExtractor, getExtractor, getExtractors, getExtractors, hasValue, initExtractors, setCurrent
-
-
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the extractor.- Overrides:
initializein classAbstractPropertyExtractor
-
handles
public boolean handles(Class cls)
Checks whether this extractor actually handles this type of class.- Specified by:
handlesin classAbstractPropertyExtractor- Parameters:
cls- the class to check- Returns:
- true if the extractor handles the object/class
-
size
public int size()
The number of properties that are available.- Specified by:
sizein classAbstractPropertyExtractor- Returns:
- the number of variables
-
getValue
public Object getValue(int index)
Returns the current value of the specified property.- Specified by:
getValuein classAbstractPropertyExtractor- Parameters:
index- the index of the property to retrieve- Returns:
- the variable value
-
getLabel
public String getLabel(int index)
Returns the label for the specified property.- Specified by:
getLabelin classAbstractPropertyExtractor- Parameters:
index- the index of the property to get the label for- Returns:
- the variable name
-
-