Modifier and Type | Field and Description |
---|---|
protected java.util.SortedMap<java.lang.Integer,Block> |
blocks
The blocks.
|
protected java.util.SortedMap<java.lang.Integer,ChildElement> |
children
The children elements.
|
protected java.util.Set<java.lang.Integer> |
comments
The sentences.
|
protected java.util.SortedMap<java.lang.Integer,Sentence> |
sentences
The sentences.
|
protected java.util.SortedMap<java.lang.Integer,java.util.List<Var>> |
vars
The variable declarations.
|
Constructor and Description |
---|
AbstractParent(int firstLine)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addBlock(Block block)
Add a block.
|
void |
addComment(int lineNumber)
Add a comment.
|
void |
addSentence(Sentence sentence)
Add a sentence.
|
void |
addVar(Var var)
Add a variable declaration.
|
java.util.SortedMap<java.lang.Integer,Block> |
getBlocks()
Return the blocks.
|
java.util.SortedMap<java.lang.Integer,ChildElement> |
getChildrenElements()
Return the children elements.
|
int |
getFirstLine()
Return the block first line.
|
int |
getLastLine()
Return the last line of the block.
|
int |
getReturnLine()
Return the return line of the block.
|
java.util.SortedMap<java.lang.Integer,Sentence> |
getSentences()
Return the sentences.
|
boolean |
isComment(int lineNumber)
Return true if there is a comment on a line.
|
void |
setFirstLine(int firstLine)
Set the first line.
|
void |
setLastLine(int lastLine)
Set the last line of the block.
|
void |
setReturnLine(int returnLine)
Set the return line of the block.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countBlocks, getBlock, getContent, getModel, getParent, getVars, isBeforeReturnLine, lastBlock
protected final java.util.SortedMap<java.lang.Integer,Block> blocks
protected final java.util.SortedMap<java.lang.Integer,Sentence> sentences
protected final java.util.SortedMap<java.lang.Integer,ChildElement> children
protected final java.util.Set<java.lang.Integer> comments
protected final java.util.SortedMap<java.lang.Integer,java.util.List<Var>> vars
public AbstractParent(int firstLine)
firstLine
- the first linepublic void setFirstLine(int firstLine)
setFirstLine
in interface Parent
firstLine
- the first linepublic int getFirstLine()
getFirstLine
in interface Parent
public void setReturnLine(int returnLine)
setReturnLine
in interface Parent
returnLine
- the return line of the blockpublic int getReturnLine()
getReturnLine
in interface Parent
public void setLastLine(int lastLine)
setLastLine
in interface Parent
lastLine
- the last line of the blockpublic int getLastLine()
getLastLine
in interface Parent
public void addBlock(Block block)
public void addSentence(Sentence sentence)
addSentence
in interface Parent
sentence
- the sentencepublic java.util.SortedMap<java.lang.Integer,ChildElement> getChildrenElements()
getChildrenElements
in interface Parent
public java.util.SortedMap<java.lang.Integer,Sentence> getSentences()
getSentences
in interface Parent
public void addComment(int lineNumber)
addComment
in interface Parent
lineNumber
- the line numberpublic boolean isComment(int lineNumber)
public java.util.SortedMap<java.lang.Integer,Block> getBlocks()
Copyright © 2019-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence