|
Language Processing v2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAdder
public class Adder
a visitor to compute the value of an XML-based arithmetic expression.
| Constructor Summary | |
|---|---|
Adder()
|
|
| Method Summary | |
|---|---|
Integer |
add(Element e)
deal with <add>. |
Integer |
document(Document d)
delegate to the document's root element. |
Integer |
element(Element e)
delegate to methods based on element name. |
static void |
main(String... arg)
take a XML-based arithmetic expression from standard input and write the value to standard output. |
Integer |
number(Element e)
deal with <number>. |
Integer |
subtract(Element e)
deal with <subtract>. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Adder()
| Method Detail |
|---|
public Integer document(Document d)
document in interface Visitorpublic Integer element(Element e)
element in interface Visitorpublic Integer add(Element e)
public Integer subtract(Element e)
public Integer number(Element e)
public static void main(String... arg)
throws Exception
Exception
|
(c) 2008 Axel T. Schreiner |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||