org.apache.poi.hssf.record.formula.eval
Class AreaEvalBase

java.lang.Object
  extended by org.apache.poi.hssf.record.formula.eval.AreaEvalBase
All Implemented Interfaces:
AreaEval, ValueEval

public abstract class AreaEvalBase
extends java.lang.Object
implements AreaEval

Author:
Josh Micich

Constructor Summary
protected AreaEvalBase(AreaI ptg)
           
protected AreaEvalBase(int firstRow, int firstColumn, int lastRow, int lastColumn)
           
 
Method Summary
 boolean contains(int row, int col)
          returns true if the cell at row and col specified as absolute indexes in the sheet is contained in this area.
 boolean containsColumn(short col)
          returns true if the specified col is in range
 boolean containsRow(int row)
          returns true if the specified row is in range
 int getFirstColumn()
          returns the 0-based index of the first col in this area.
 int getFirstRow()
          returns the 0-based index of the first row in this area.
 int getHeight()
           
 int getLastColumn()
          returns the 0-based index of the last col in this area.
 int getLastRow()
          returns the 0-based index of the last row in this area.
abstract  ValueEval getRelativeValue(int relativeRowIndex, int relativeColumnIndex)
           
 ValueEval getValueAt(int row, int col)
           
 int getWidth()
           
 boolean isColumn()
          returns true if the Area's start and end col indexes are same.
 boolean isRow()
          returns true if the Area's start and end row indexes are same.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.poi.hssf.record.formula.eval.AreaEval
offset
 

Constructor Detail

AreaEvalBase

protected AreaEvalBase(int firstRow,
                       int firstColumn,
                       int lastRow,
                       int lastColumn)

AreaEvalBase

protected AreaEvalBase(AreaI ptg)
Method Detail

getFirstColumn

public final int getFirstColumn()
Description copied from interface: AreaEval
returns the 0-based index of the first col in this area.

Specified by:
getFirstColumn in interface AreaEval

getFirstRow

public final int getFirstRow()
Description copied from interface: AreaEval
returns the 0-based index of the first row in this area.

Specified by:
getFirstRow in interface AreaEval

getLastColumn

public final int getLastColumn()
Description copied from interface: AreaEval
returns the 0-based index of the last col in this area.

Specified by:
getLastColumn in interface AreaEval

getLastRow

public final int getLastRow()
Description copied from interface: AreaEval
returns the 0-based index of the last row in this area.

Specified by:
getLastRow in interface AreaEval

getValueAt

public final ValueEval getValueAt(int row,
                                  int col)
Specified by:
getValueAt in interface AreaEval
Returns:
the ValueEval from within this area at the specified row and col index. Never null (possibly BlankEval). The specified indexes should be absolute indexes in the sheet and not relative indexes within the area.

contains

public final boolean contains(int row,
                              int col)
Description copied from interface: AreaEval
returns true if the cell at row and col specified as absolute indexes in the sheet is contained in this area.

Specified by:
contains in interface AreaEval

containsRow

public final boolean containsRow(int row)
Description copied from interface: AreaEval
returns true if the specified row is in range

Specified by:
containsRow in interface AreaEval

containsColumn

public final boolean containsColumn(short col)
Description copied from interface: AreaEval
returns true if the specified col is in range

Specified by:
containsColumn in interface AreaEval

isColumn

public final boolean isColumn()
Description copied from interface: AreaEval
returns true if the Area's start and end col indexes are same. This result of this method should agree with getFirstColumn() == getLastColumn().

Specified by:
isColumn in interface AreaEval

isRow

public final boolean isRow()
Description copied from interface: AreaEval
returns true if the Area's start and end row indexes are same. This result of this method should agree with getFirstRow() == getLastRow().

Specified by:
isRow in interface AreaEval

getHeight

public int getHeight()
Specified by:
getHeight in interface AreaEval

getRelativeValue

public abstract ValueEval getRelativeValue(int relativeRowIndex,
                                           int relativeColumnIndex)
Specified by:
getRelativeValue in interface AreaEval
Returns:
the ValueEval from within this area at the specified relativeRowIndex and relativeColumnIndex. Never null (possibly BlankEval). The specified indexes should relative to the top left corner of this area.

getWidth

public int getWidth()
Specified by:
getWidth in interface AreaEval


Copyright 2012 The Apache Software Foundation or its licensors, as applicable.