jxl.read.biff
Class NumberValue

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

class NumberValue
extends java.lang.Object
implements NumberCell

A numerical cell value, initialized indirectly from a multiple biff record rather than directly from the binary data


Field Summary
private  CellFormat cellFormat
          The raw cell format
private  int column
          The column containing this number
private static java.text.DecimalFormat defaultFormat
          The format in which to return this number as a string
private  java.text.NumberFormat format
          The cell format
private  FormattingRecords formattingRecords
          A handle to the formatting records
private  boolean initialized
          A flag to indicate whether this object's formatting things have been initialized
private  int row
          The row containing this number
private  SheetImpl sheet
          A handle to the sheet
private  double value
          The value of this number
private  int xfIndex
          The index to the XF Record
 
Constructor Summary
NumberValue(int r, int c, double val, int xfi, FormattingRecords fr, SheetImpl si)
          Constructs this number
 
Method Summary
 CellFormat getCellFormat()
          Gets the cell format
 int getColumn()
          Accessor for the column
 java.lang.String getContents()
          Accessor for the contents as a string
 int getRow()
          Accessor for the row
 CellType getType()
          Accessor for the cell type
 double getValue()
          Accessor for the value
 boolean isHidden()
          Determines whether or not this cell has been hidden
(package private)  void setNumberFormat(java.text.NumberFormat f)
          Sets the format for the number based on the Excel spreadsheets' format.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

row

private int row
The row containing this number

column

private int column
The column containing this number

value

private double value
The value of this number

format

private java.text.NumberFormat format
The cell format

cellFormat

private CellFormat cellFormat
The raw cell format

xfIndex

private int xfIndex
The index to the XF Record

formattingRecords

private FormattingRecords formattingRecords
A handle to the formatting records

initialized

private boolean initialized
A flag to indicate whether this object's formatting things have been initialized

sheet

private SheetImpl sheet
A handle to the sheet

defaultFormat

private static java.text.DecimalFormat defaultFormat
The format in which to return this number as a string
Constructor Detail

NumberValue

public NumberValue(int r,
                   int c,
                   double val,
                   int xfi,
                   FormattingRecords fr,
                   SheetImpl si)
Constructs this number
Parameters:
c - the zero base column
r - the zero based row
val - the value
si - the sheet
Method Detail

setNumberFormat

final void setNumberFormat(java.text.NumberFormat f)
Sets the format for the number based on the Excel spreadsheets' format. This is called from SheetImpl when it has been definitely established that this cell is a number and not a date
Parameters:
f - the format

getRow

public final int getRow()
Accessor for the row
Specified by:
getRow in interface Cell
Returns:
the zero based row

getColumn

public final int getColumn()
Accessor for the column
Specified by:
getColumn in interface Cell
Returns:
the zero based column

getValue

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

getContents

public java.lang.String getContents()
Accessor for the contents as a string
Specified by:
getContents in interface Cell
Returns:
the value as a string

getType

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

getCellFormat

public CellFormat getCellFormat()
Gets the cell format
Specified by:
getCellFormat in interface Cell
Returns:
the cell format

isHidden

public boolean isHidden()
Determines whether or not this cell has been hidden
Specified by:
isHidden in interface Cell
Returns:
TRUE if this cell has been hidden, FALSE otherwise