Class AbstractCellFinder

    • Constructor Detail

      • AbstractCellFinder

        public AbstractCellFinder()
    • Method Detail

      • 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 interface QuickInfoSupporter
        Returns:
        null if no info available, otherwise short string
      • check

        protected void check​(SpreadSheet sheet)
        Checks whether the spreadsheet can be processed.

        Default implementation only checks whether a spreadsheet was provided.
        Parameters:
        sheet - the spreadsheet to check
      • doFindCells

        protected abstract Iterator<CellLocation> doFindCells​(SpreadSheet sheet)
        Performs the actual locating.
        Parameters:
        sheet - the sheet to locate the cells in
        Returns:
        the iterator over the locations
      • findCells

        public Iterator<CellLocation> findCells​(SpreadSheet sheet)
        Locates the cells in the spreadsheet.
        Specified by:
        findCells in interface CellFinder
        Parameters:
        sheet - the sheet to locate the cells in
        Returns:
        the iterator over the locations
      • shallowCopy

        public CellFinder shallowCopy()
        Returns a shallow copy of itself, i.e., based on the commandline options.
        Returns:
        the shallow copy
      • shallowCopy

        public CellFinder shallowCopy​(boolean expand)
        Returns a shallow copy of itself, i.e., based on the commandline options.
        Parameters:
        expand - whether to expand variables to their current values
        Returns:
        the shallow copy
      • getCellFinders

        public static String[] getCellFinders()
        Returns a list with classnames of cell finders.
        Returns:
        the cell finder classnames
      • forName

        public static CellFinder forName​(String classname,
                                         String[] options)
        Instantiates the cell finder with the given options.
        Parameters:
        classname - the classname of the cell finder to instantiate
        options - the options for the cell finder
        Returns:
        the instantiated cell finder or null if an error occurred
      • forCommandLine

        public static CellFinder forCommandLine​(String cmdline)
        Instantiates the cell finder from the given commandline (i.e., classname and optional options).
        Parameters:
        cmdline - the classname (and optional options) of the cell finder to instantiate
        Returns:
        the instantiated cell finder or null if an error occurred