|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--com.rubecula.spreadsheet.Formula
Class to manage a list of elements, starting with the operator and continuing with the operands in order. The operands may be in any of three forms:
| Nested Class Summary | |
(package private) static class |
Formula.FormulaException
Static class to define an exception encountered when parsing a formula. |
| Nested classes inherited from class java.util.AbstractList |
|
| Field Summary |
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
Formula(java.lang.String operator)
Constructor for an "anadic" formula of all strings. |
|
Formula(java.lang.String operator,
java.lang.Object operand)
Constructor for a "monadic" formula of all strings. |
|
Formula(java.lang.String operator,
java.lang.Object operand1,
java.lang.Object operand2)
Constructor for a "dyadic" formula of all strings. |
|
| Method Summary | |
void |
dereference(Presentable dependent,
CellTable cells)
Method to dereference a formula and at the same time, set up dependencies. |
Presentable |
evaluate()
Convert this Presentable object into a Presentation. |
Presentable |
getElement()
MUTATING method to get the first element from the formula as a Presentable. |
static MillFactoryInterface |
GetMillFactory()
Method to get the mill factory, for the purpose of identifying the function evaluator. |
java.lang.String |
getType()
This method is primarily for development purposes: it yields the name of the class of the presentable object or, in some cases, the class of the presentable object indirectly referenced. |
Presentable |
makePresentableInstance(Presentation x)
Instance method to convert a Presentation into a Presentable. |
Presentation |
present()
Convert this Presentable object into a Presentation with default attributes. |
Presentation |
present(AttrMap attributes)
Convert this Presentable object into a Presentation, according to the set of attributes provided. |
static Formula |
valueOf(java.lang.String formula)
Factory method to yield a Formula from a string. |
| Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
| Constructor Detail |
public Formula(java.lang.String operator)
operator - the operator.
public Formula(java.lang.String operator,
java.lang.Object operand)
operator - the operator.operand - the operand.
public Formula(java.lang.String operator,
java.lang.Object operand1,
java.lang.Object operand2)
operator - the operator.operand1 - the first operand.operand2 - the second operand.| Method Detail |
public static Formula valueOf(java.lang.String formula)
throws Formula.FormulaException
formula - the required formula in string form.
Formula.FormulaException
Formula.FormulaExceptionpublic static MillFactoryInterface GetMillFactory()
public Presentable evaluate()
throws PresentableException
PresentableException
SpreadsheetException
public Presentation present(AttrMap attributes)
throws PresentationException
present in interface Presentableattributes - a map of desired attributes for this presentation.
PresentationException - if formula cannot be presented with
given attributes.
public Presentation present()
throws PresentationException
PresentationException - if formula cannot be presented with
given attributes.public java.lang.String getType()
getType in interface Presentablepublic Presentable makePresentableInstance(Presentation x)
makePresentableInstance in interface Presentablex - a presentation of a number which you want to convert into a number.
public void dereference(Presentable dependent,
CellTable cells)
dependent - the presentable (a QuantityCell) which is dependent on this formula.cells - map of relevant cells.
public Presentable getElement()
throws PresentableException
PresentableException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||