|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.data.spreadsheet.cellfinder.AbstractCellFinder
adams.data.spreadsheet.cellfinder.CorrespondingColumn
public class CorrespondingColumn
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).
-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.AbstractCellFinder> (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
| Nested Class Summary | |
|---|---|
static class |
CorrespondingColumn.CorrespondingColumnIterator
Cell iterator that returns the locations for the corresponding cells. |
| Field Summary | |
|---|---|
protected int |
m_CorrespondingColumn
the position of the corresponding column. |
protected PositionType |
m_CorrespondingPosition
whether the corresponding column is relative or absolute. |
protected AbstractCellFinder |
m_Finder
the base cell finder to use. |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
CorrespondingColumn()
|
|
| Method Summary | |
|---|---|
String |
correspondingColumnTipText()
Returns the tip text for this property. |
String |
correspondingPositionTipText()
Returns the tip text for this property. |
void |
defineOptions()
Adds options to the internal list of options. |
protected Iterator<CellLocation> |
doFindCells(SpreadSheet sheet)
Performs the actual locating. |
String |
finderTipText()
Returns the tip text for this property. |
int |
getCorrespondingColumn()
Returns the column location (abs/rel). |
PositionType |
getCorrespondingPosition()
Returns how to interpret the column position. |
AbstractCellFinder |
getFinder()
Returns the base cell finder. |
String |
globalInfo()
|
void |
setCorrespondingColumn(int value)
Sets the column location (abs/rel). |
void |
setCorrespondingPosition(PositionType value)
Sets how to interpret the column position. |
void |
setFinder(AbstractCellFinder value)
Sets the base cell finder. |
| Methods inherited from class adams.data.spreadsheet.cellfinder.AbstractCellFinder |
|---|
check, findCells, forCommandLine, forName, getCellFinders, shallowCopy, shallowCopy |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut, sizeOf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected AbstractCellFinder m_Finder
protected PositionType m_CorrespondingPosition
protected int m_CorrespondingColumn
| Constructor Detail |
|---|
public CorrespondingColumn()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractOptionHandlerpublic void setFinder(AbstractCellFinder value)
value - the finderpublic AbstractCellFinder getFinder()
public String finderTipText()
public void setCorrespondingPosition(PositionType value)
value - the position typepublic PositionType getCorrespondingPosition()
public String correspondingPositionTipText()
public void setCorrespondingColumn(int value)
value - the locationpublic int getCorrespondingColumn()
public String correspondingColumnTipText()
protected Iterator<CellLocation> doFindCells(SpreadSheet sheet)
doFindCells in class AbstractCellFindersheet - the sheet to locate the cells in
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||