|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.extentech.ExtenXLS.CellRangeRef
public class CellRangeRef
Represents a reference to a 3D range of cells. This class is not currently part of the public API. No input validation whatsoever is performed. Any combination of values may be set, whether it makes any sense or not.
| Constructor Summary | |
|---|---|
CellRangeRef(int first_row,
int first_col,
int last_row,
int last_col)
|
|
CellRangeRef(int first_row,
int first_col,
int last_row,
int last_col,
String first_sheet,
String last_sheet)
|
|
CellRangeRef(int first_row,
int first_col,
int last_row,
int last_col,
WorkSheetHandle first_sheet,
WorkSheetHandle last_sheet)
|
|
| Method Summary | |
|---|---|
Object |
clone()
Creates and returns a copy of this range. |
boolean |
contains(CellRangeRef range)
Returns whether this range entirely contains the given range. |
boolean |
equals(Object other)
Compares this range to the specified object. |
static CellRangeRef |
fromA1(String reference)
Parses a range in A1 notation and returns the equivalent CellRangeRef. |
static CellRangeRef |
fromA1(String reference,
WorkBookHandle book)
Convenience method combining fromA1(String) and
resolve(WorkBookHandle). |
int |
getFirstColumn()
Returns the lowest-indexed column in this range. |
int |
getFirstRow()
Returns the lowest-indexed row in this range. |
WorkSheetHandle |
getFirstSheet()
Returns the first sheet in this range. |
String |
getFirstSheetName()
Returns the name of the first sheet in this range. |
int |
getLastColumn()
Returns the highest-indexed column in this range. |
int |
getLastRow()
Returns the highest-indexed row in this range. |
WorkSheetHandle |
getLastSheet()
Returns the last sheet in this range. |
String |
getLastSheetName()
Returns the name of the last sheet in this range. |
boolean |
hasSheet()
Determines whether this range is qualified with a sheet. |
boolean |
isMultiSheet()
Determines whether this range spans multiple sheets. |
void |
resolve(WorkBookHandle book)
Resolves sheet names into sheet handles against the given book. |
void |
setFirstColumn(int value)
Sets the first column in this range. |
void |
setFirstRow(int value)
Sets the first row in this range. |
void |
setFirstSheet(WorkSheetHandle sheet)
Sets the first sheet in this range. |
void |
setLastColumn(int value)
Sets the last column in this range. |
void |
setLastRow(int value)
Sets the last row in this range. |
void |
setLastSheet(WorkSheetHandle sheet)
Sets the last sheet in this range. |
String |
toString()
Gets this range in A1 notation. |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CellRangeRef(int first_row,
int first_col,
int last_row,
int last_col)
public CellRangeRef(int first_row,
int first_col,
int last_row,
int last_col,
String first_sheet,
String last_sheet)
public CellRangeRef(int first_row,
int first_col,
int last_row,
int last_col,
WorkSheetHandle first_sheet,
WorkSheetHandle last_sheet)
| Method Detail |
|---|
public static CellRangeRef fromA1(String reference)
public static CellRangeRef fromA1(String reference,
WorkBookHandle book)
throws com.extentech.formats.XLS.WorkSheetNotFoundException
fromA1(String) and
resolve(WorkBookHandle).
com.extentech.formats.XLS.WorkSheetNotFoundException
public void resolve(WorkBookHandle book)
throws com.extentech.formats.XLS.WorkSheetNotFoundException
book - the book against which the sheet names should be resolved
com.extentech.formats.XLS.WorkSheetNotFoundException - if either of the sheets does not
exist in the given bookpublic int getFirstRow()
public int getFirstColumn()
public int getLastRow()
public int getLastColumn()
public String getFirstSheetName()
public WorkSheetHandle getFirstSheet()
public String getLastSheetName()
public WorkSheetHandle getLastSheet()
public boolean hasSheet()
public boolean isMultiSheet()
public void setFirstRow(int value)
value - the row index to setpublic void setFirstColumn(int value)
value - the column index to setpublic void setFirstSheet(WorkSheetHandle sheet)
public void setLastRow(int value)
value - the row index to setpublic void setLastColumn(int value)
value - the column index to setpublic void setLastSheet(WorkSheetHandle sheet)
public boolean contains(CellRangeRef range)
public boolean equals(Object other)
true if and only if the argument is not
null and is a CellRangeRef object that
represents the same range as this object.
equals in class Objectpublic Object clone()
clone in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||