|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object olg.csv.base.Cell
public class Cell
Cell in a spreadsheet. Impoverished model to be conformed with use of CSV.
Row
Field Summary | |
---|---|
private static byte |
CHAR_A
A char as byte. |
private static String |
FORMAT_NUM_REGEXP
Reg Exp to validate num Cell format. |
private static int |
NB_CHAR
NB alpha char. |
private int |
num
the cell num in its row. |
private String |
value
The value of the cell. |
Constructor Summary | |
---|---|
Cell(int num,
String value)
|
|
Cell(String num,
String value)
|
Method Summary | |
---|---|
static String |
defaultCellName(String num)
Returns the default cell name. |
boolean |
equals(Object obj)
|
static int |
fromSheetCellNumber(String num)
Interprets the String in argument as a cell number. |
private static int |
fromSheetFormatNumber(String num)
Returns the column number. |
int |
getNum()
Column number of this cell among parent row cells. |
String |
getSheetFormatNumber()
Returns the column number of this cell in a spreadsheet format ( A for 0, AA for 26, ...). |
static String |
getSheetFormatNumber(int num)
Returns a num cell in a spreadsheet cell number format. |
String |
getValue()
Returns the value of this cell. |
int |
hashCode()
|
boolean |
isEmpty()
Returns true if this cell represents an empty cell. |
String |
toString()
Returns the couple (num: value) that this cell represents. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final String FORMAT_NUM_REGEXP
private static final int NB_CHAR
private static final byte CHAR_A
private final int num
private final String value
Constructor Detail |
---|
public Cell(int num, String value)
num
- column number. Must be >= 0.value
- cell valuepublic Cell(String num, String value)
num
- column numbervalue
- cell valueMethod Detail |
---|
public static int fromSheetCellNumber(String num)
num
- the num cell. Must match one of the two cases see above.
public static String getSheetFormatNumber(int num)
num
- . Must be >=0.
public static String defaultCellName(String num)
num
- the num of a cell.
public int getNum()
public String getValue()
null
if this cell is empty.public boolean isEmpty()
public String getSheetFormatNumber()
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
private static int fromSheetFormatNumber(String num)
num
- column number in a spreadsheet format.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |