jxl.read.biff
Class NumberRecord

java.lang.Object
  |
  +--jxl.biff.RecordData
        |
        +--jxl.read.biff.CellValue
              |
              +--jxl.read.biff.NumberRecord
All Implemented Interfaces:
Cell, NumberCell

class NumberRecord
extends CellValue
implements NumberCell

A number record. This is stored as 8 bytes, as opposed to the 4 byte RK record


Field Summary
private static java.text.DecimalFormat defaultFormat
          The formatter to convert the value into a string
private  java.text.NumberFormat format
          The java equivalent of the excel format
private  double value
          The value
 
Fields inherited from class jxl.read.biff.CellValue
column, formattingRecords, initialized, row, sheet, xfIndex
 
Fields inherited from class jxl.biff.RecordData
code, record
 
Constructor Summary
NumberRecord(Record t, FormattingRecords fr, SheetImpl si)
          Constructs this object from the raw data
 
Method Summary
 java.lang.String getContents()
          Returns the contents of this cell as a string
 java.text.NumberFormat getNumberFormat()
          Gets the NumberFormat used to format this cell.
 CellType getType()
          Accessor for the cell type
 double getValue()
          Accessor for the value
 
Methods inherited from class jxl.read.biff.CellValue
getCellFormat, getColumn, getRow, getSheet, getXFIndex, isHidden
 
Methods inherited from class jxl.biff.RecordData
getCode, getRecord
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface jxl.Cell
getCellFormat, getColumn, getRow, isHidden
 

Field Detail

value

private double value
The value

format

private java.text.NumberFormat format
The java equivalent of the excel format

defaultFormat

private static java.text.DecimalFormat defaultFormat
The formatter to convert the value into a string
Constructor Detail

NumberRecord

public NumberRecord(Record t,
                    FormattingRecords fr,
                    SheetImpl si)
Constructs this object from the raw data
Parameters:
t - the raw data
fr - the available formats
si - the sheet
Method Detail

getValue

public double getValue()
Accessor for the value
Specified by:
getValue in interface NumberCell
Returns:
the value

getContents

public java.lang.String getContents()
Returns the contents of this cell as a string
Specified by:
getContents in interface Cell
Returns:
the value formatted into a string

getType

public CellType getType()
Accessor for the cell type
Specified by:
getType in interface Cell
Returns:
the cell type

getNumberFormat

public java.text.NumberFormat getNumberFormat()
Gets the NumberFormat used to format this cell. This is the java equivalent of the Excel format
Specified by:
getNumberFormat in interface NumberCell
Returns:
the NumberFormat used to format the cell