|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcsheets.core.formula.lang.CellReference
public class CellReference
A reference to a cell in a spreadsheet.
| Constructor Summary | |
|---|---|
CellReference(Cell cell)
Creates a new cell reference to the given address. |
|
CellReference(Cell cell,
boolean columnAbsolute,
boolean rowAbsolute)
Creates a new cell reference to the given address, using the given reference mode. |
|
CellReference(Spreadsheet spreadsheet,
String reference)
Creates a new cell reference from a string matching the (@link #PATTERN). |
|
| Method Summary | |
|---|---|
Object |
accept(ExpressionVisitor visitor)
Accepts to visit the given expression visitor. |
int |
compareTo(Reference reference)
Compares the cell reference with the given cell reference for order. |
Value |
evaluate()
Evaluates the expression and returns the result. |
Cell |
getCell()
Returns the cell to which the reference points. |
SortedSet<Cell> |
getCells()
Returns the cell addresses (or address) that the reference points to. |
boolean |
isColumnAbsolute()
Returns whether the column is denoted with an absolute reference. |
boolean |
isRowAbsolute()
Returns whether the row is denoted with an absolute reference. |
String |
toString()
Returns a string representation of the address of the cell reference on the form "B22", composed of the letter of the column and number of the row that intersect to form the address. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CellReference(Cell cell)
cell - the cell to which the reference points
public CellReference(Cell cell,
boolean columnAbsolute,
boolean rowAbsolute)
cell - the cell to which the reference pointscolumnAbsolute - if the column is denoted with an absolute referencerowAbsolute - if the column is denoted with an absolute reference
public CellReference(Spreadsheet spreadsheet,
String reference)
throws ParseException
spreadsheet - the spreadsheet of the cellreference - a string representation of the reference
ParseException - if the string did not match the pattern| Method Detail |
|---|
public Value evaluate()
Expression
evaluate in interface Expressionevaluate in interface Reference
public Object accept(ExpressionVisitor visitor)
throws ExpressionVisitorException
Expression
accept in interface Expressionvisitor - the visitor
ExpressionVisitorExceptionpublic Cell getCell()
public SortedSet<Cell> getCells()
Reference
getCells in interface Referencepublic boolean isColumnAbsolute()
public boolean isRowAbsolute()
public int compareTo(Reference reference)
compareTo in interface ReferencecompareTo in interface Comparable<Reference>reference - the reference to be compared
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||