Class VariablesPropertyExtractor

  • All Implemented Interfaces:
    CleanUpHandler

    public class VariablesPropertyExtractor
    extends AbstractPropertyExtractor
    Handles Variables and derived classes, listing each variable as a separate property.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • m_Names

        protected Vector<String> m_Names
        the variable names.
    • Constructor Detail

      • VariablesPropertyExtractor

        public VariablesPropertyExtractor()
    • Method Detail

      • handles

        public boolean handles​(Class cls)
        Checks whether this extractor actually handles this type of class.
        Specified by:
        handles in class AbstractPropertyExtractor
        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:
        size in class AbstractPropertyExtractor
        Returns:
        the number of variables
      • getValue

        public Object getValue​(int index)
        Returns the current value of the specified property.
        Specified by:
        getValue in class AbstractPropertyExtractor
        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:
        getLabel in class AbstractPropertyExtractor
        Parameters:
        index - the index of the property to get the label for
        Returns:
        the variable name