Class CorrespondingColumn

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, SizeOfHandler, CellFinder, Serializable

    public class CorrespondingColumn
    extends AbstractCellFinder
    Rather than return a cell that was located using the given cell finder, you can return a corresponding cell (within the same row).
    This allows you to locate cells with certain value but then update a different column in the same row. You can specify whether the position of the corresponding column is relative (+3 or -4) or absolute (5th).

    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to 
        the console (0 = off).
        default: 0
        minimum: 0
     
    -finder <adams.data.spreadsheet.cellfinder.CellFinder> (property: finder)
        The base cell finder to locate the cells.
        default: adams.data.spreadsheet.cellfinder.ColumnFinderRange -column-finder adams.data.spreadsheet.columnfinder.ByIndex
     
    -corresponding-position <ABSOLUTE|RELATIVE> (property: correspondingPosition)
        How to interpret the column position.
        default: RELATIVE
     
    -corresponding-column <int> (property: correspondingColumn)
        The location of the column: 1-based if absolute mode; 0 in relative mode 
        is the column itself.
        default: 0
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Finder

        protected CellFinder m_Finder
        the base cell finder to use.
      • m_CorrespondingPosition

        protected PositionType m_CorrespondingPosition
        whether the corresponding column is relative or absolute.
      • m_CorrespondingColumn

        protected int m_CorrespondingColumn
        the position of the corresponding column.
    • Constructor Detail

      • CorrespondingColumn

        public CorrespondingColumn()
    • Method Detail

      • setFinder

        public void setFinder​(CellFinder value)
        Sets the base cell finder.
        Parameters:
        value - the finder
      • getFinder

        public CellFinder getFinder()
        Returns the base cell finder.
        Returns:
        the finder
      • finderTipText

        public String finderTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setCorrespondingPosition

        public void setCorrespondingPosition​(PositionType value)
        Sets how to interpret the column position.
        Parameters:
        value - the position type
      • getCorrespondingPosition

        public PositionType getCorrespondingPosition()
        Returns how to interpret the column position.
        Returns:
        the position type
      • correspondingPositionTipText

        public String correspondingPositionTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setCorrespondingColumn

        public void setCorrespondingColumn​(int value)
        Sets the column location (abs/rel).
        Parameters:
        value - the location
      • getCorrespondingColumn

        public int getCorrespondingColumn()
        Returns the column location (abs/rel).
        Returns:
        the location
      • correspondingColumnTipText

        public String correspondingColumnTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui