com.rubecula.spreadsheet
Class Text
java.lang.Object
|
+--com.rubecula.spreadsheet.Text
- All Implemented Interfaces:
- Presentable
- public class Text
- extends java.lang.Object
- implements Presentable
Class to represent text which is the value of a spreadsheet cell.
- Version:
- $Revision: 1.1 $
- Author:
- Robin Hillyard
|
Constructor Summary |
Text(java.lang.String s)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Text
public Text(java.lang.String s)
present
public Presentation present(AttrMap attributes)
- Convert this Presentable object into a Presentation,
according to the set of attributes provided.
- Specified by:
present in interface Presentable
- Parameters:
attributes - a map of the desired attributes for this presentation.
- Returns:
- an appropriate instance of Presentation.
makePresentableInstance
public Presentable makePresentableInstance(Presentation x)
- Instance method to convert a Presentation into a Presentable.
Ideally, this would be a class method, but such a method cannot be defined in an interface.
Nor can it be defined in an abstract class with the intention of overriding it in a subclass.
Polymorphism just doesn't work that way.
Therefore, the present value (as in fields) of the instance is essentially ignored - only
the methods are important.
- Specified by:
makePresentableInstance in interface Presentable
- Parameters:
x - a presentation of a number which you want to convert into a number.
- Returns:
- a number in the form of a Presentable.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object