|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TextGenerator
The base interface of text generation from attributed tree.
| Field Summary | |
|---|---|
static String |
endl
Line separator string. |
| Fields inherited from interface com.unitesk.atp.text.generation.Generator |
|---|
DEFAULT_NAME |
| Method Summary | |
|---|---|
void |
decIndent()
Decreases indent level at one indent step. |
int |
getIndent()
Returns the current indent level. |
Node |
getNode()
Returns current node. |
void |
incIndent()
Increases indent level at one indent step. |
void |
list(String index,
int start,
int end,
String str,
String separator)
Prints list of strings. |
void |
nl()
Starts a new line of text. |
void |
popIndent()
Restores previous indent level. |
void |
popNode()
Restore previous node. |
void |
pushIndent(int indent)
Makes indent current indent level. |
void |
pushNode(Node node)
Sets default node for all operations with attributes. |
| Methods inherited from interface com.unitesk.atp.text.generation.Generator |
|---|
getFunction, getVariable, setFunction, setVariable, txt, txtAsIs |
| Field Detail |
|---|
static final String endl
| Method Detail |
|---|
void pushNode(Node node)
node for all operations with attributes.
node - The new default node.Node getNode()
void popNode()
void pushIndent(int indent)
indent current indent level.
The previous indent level can be restored by popIndent()
indent - the new indent level
IllegalArgumentException - if indent is negativeint getIndent()
void incIndent()
popIndent()
void decIndent()
popIndent()
IllegalArgumentException - if resulting indent level is negativevoid popIndent()
EmptyStackException - if indent level was not setpushIndent(int),
incIndent(),
decIndent()
void list(String index,
int start,
int end,
String str,
String separator)
index - The variable name to store current index of list element.start - The starting value of an indexend - if start < end thenstr - The string to print for each list element using
txt( str )separator - The separator to print between strings
for list elements using
txt( str )
NullPointerException - if any parameter is null
(except separator)void nl()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||