Package subjectdata :: Module CellValue :: Class CellValue
[show private | hide private]
[frames | no frames]

Class CellValue


Class implementing a union (float,string).
Method Summary
  __init__(self, valueFloat, valueString)
CellValue's constructor.
  __str__(self)
  equals(self, obj)
Returns true if obj equals this object.
float getFloat(self)
Returns a float value, if this object is a float.
string getString(self)
Returns a string value, if this object is a string.
bool isFloat(self)
Returns true if this object is a float
string isString(self)
Returns true if this object is a string
  setFloat(self, value)
Set the float value, if this object is a float.
  setString(self, value)
Set the string value, if this object is a string.

Method Details

__init__(self, valueFloat=None, valueString=None)
(Constructor)

CellValue's constructor. Takes two facultative arguments, which cannot be specified at the same time.
Parameters:
valueFloat - specify the float value
           (type=float)
valueString - specify the string value
           (type=string)

Requires: Not both parameters specified at the same time

equals(self, obj)

Returns true if obj equals this object.
Parameters:
obj - the compared object
           (type=Object)

getFloat(self)

Returns a float value, if this object is a float. Otherwise, it raises an exception.
Returns:
float
Raises:
TypeError - When this object is not a float

getString(self)

Returns a string value, if this object is a string. Otherwise, it raises an exception.
Returns:
string
Raises:
TypeError - When this object is not a string

isFloat(self)

Returns true if this object is a float
Returns:
bool

isString(self)

Returns true if this object is a string
Returns:
string

setFloat(self, value)

Set the float value, if this object is a float. Otherwise, it raises an exception.
Raises:
TypeError - When this object is not a float

setString(self, value)

Set the string value, if this object is a string. Otherwise, it raises an exception.
Raises:
TypeError - When this object is not a string

Generated by Epydoc 2.1 on Tue Aug 17 18:20:07 2004 http://epydoc.sf.net