|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.rubecula.math.Macro
Class
to model a macro, that's to say a compound operator, as a Presentable.
The definition of the macro is held as a set of strings concatenated with
$S_DELIM.
| Field Summary | |
private java.lang.String |
_Definition
The definition of the macro. |
private static java.lang.String |
$S_DELIM
Delimiter of operators within a Macro. |
| Constructor Summary | |
Macro(java.lang.String definition)
Primary constructor to create a Macro from a String. |
|
Macro(java.lang.String first,
java.lang.String second)
|
|
| Method Summary | |
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 presentation)
Instance method to convert a Presentation into a Presentable. |
Presentation |
present(AttrMap attributes)
Convert this Presentable object into a Presentation, according to the set of attributes provided. |
java.util.StringTokenizer |
tokenize()
|
static Macro |
valueOf(java.lang.String[] operations)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String $S_DELIM
private final java.lang.String _Definition
| Constructor Detail |
public Macro(java.lang.String definition)
definition -
public Macro(java.lang.String first,
java.lang.String second)
| Method Detail |
public static final Macro valueOf(java.lang.String[] operations)
public Presentation present(AttrMap attributes)
throws PresentationException
Presentable
present in interface Presentableattributes - a map of the attributes desired for the construction
of the new presentation (may be empty).
PresentationException - in case of parsing error.
public Presentable makePresentableInstance(Presentation presentation)
throws PresentationException
Presentable
makePresentableInstance in interface Presentablepresentation - of a number to be converted into a Presentable number.
PresentationException - in case of parsing error.public java.lang.String getType()
Presentable
getType in interface Presentablepublic java.util.StringTokenizer tokenize()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||