jxl.write.biff
Class NumberRecord
java.lang.Object
|
+--jxl.biff.RecordData
|
+--jxl.biff.WritableRecordData
|
+--jxl.write.biff.CellValue
|
+--jxl.write.biff.NumberRecord
- All Implemented Interfaces:
- ByteData, Cell, WritableCell
- Direct Known Subclasses:
- Number
- public class NumberRecord
- extends CellValue
The record which contains numerical values. All values are stored
as 64bit IEEE floating point values
Field Summary |
private double |
value
The number |
Constructor Summary |
protected |
NumberRecord(int c,
int r,
double val)
Constructor invoked by the user API |
protected |
NumberRecord(int c,
int r,
double val,
CellFormat st)
Overloaded constructor invoked from the API, which takes a cell
format |
protected |
NumberRecord(NumberCell nc)
Constructor used when copying a workbook |
Method Summary |
java.lang.String |
getContents()
Quick and dirty function to return the contents of this cell as a string. |
byte[] |
getData()
Gets the binary data for output to file |
CellType |
getType()
Returns the content type of this cell |
double |
getValue()
Gets the double contents for this cell. |
void |
setValue(double val)
Sets the value of the contents for this cell |
Methods inherited from class jxl.write.biff.CellValue |
decrementColumn, decrementRow, getCellFormat, getColumn, getRow, getXFIndex, incrementColumn, incrementRow, isHidden, isReferenced, setCellDetails, setCellFormat |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
value
private double value
- The number
NumberRecord
protected NumberRecord(int c,
int r,
double val)
- Constructor invoked by the user API
- Parameters:
c
- the columnr
- the rowval
- the value
NumberRecord
protected NumberRecord(int c,
int r,
double val,
CellFormat st)
- Overloaded constructor invoked from the API, which takes a cell
format
- Parameters:
c
- the columnr
- the rowval
- the valuest
- the cell format
NumberRecord
protected NumberRecord(NumberCell nc)
- Constructor used when copying a workbook
- Parameters:
nc
- the number to copy
getType
public CellType getType()
- Returns the content type of this cell
- Returns:
- the content type for this cell
getData
public byte[] getData()
- Gets the binary data for output to file
- Overrides:
getData
in class CellValue
- Returns:
- the binary data
getContents
public java.lang.String getContents()
- Quick and dirty function to return the contents of this cell as a string.
For more complex manipulation of the contents, it is necessary to cast
this interface to correct subinterface
- Returns:
- the contents of this cell as a string
getValue
public double getValue()
- Gets the double contents for this cell.
- Returns:
- the cell contents
setValue
public void setValue(double val)
- Sets the value of the contents for this cell
- Parameters:
val
- the new value