public interface Parent
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.
|
default int |
countBlocks()
Count the number of blocks.
|
default Block |
getBlock(int lineNumber)
Return the block for a specified lineNumber.
|
java.util.SortedMap<java.lang.Integer,Block> |
getBlocks()
Return the blocks.
|
java.util.SortedMap<java.lang.Integer,ChildElement> |
getChildrenElements()
Return the children elements.
|
default java.lang.String |
getContent()
Return the String content of the model for the parent.
|
int |
getFirstLine()
Return the first line of the parent.
|
int |
getLastLine()
Return the last line of the parent.
|
SourceModel |
getModel()
Return the root model.
|
Parent |
getParent()
Return the element Parent.
|
int |
getReturnLine()
Return the return line of the parent.
|
java.util.SortedMap<java.lang.Integer,Sentence> |
getSentences()
Return the sentences.
|
java.util.SortedMap<java.lang.Integer,java.util.List<Var>> |
getVars()
Return the variable declarations.
|
default boolean |
isBeforeReturnLine(int line)
Return true if a line number is before the return line of the parent.
|
boolean |
isComment(int lineNumber)
Return true if there is a comment on a line.
|
default Block |
lastBlock()
Return the last block.
|
void |
setFirstLine(int firstLine)
Set the first line.
|
void |
setLastLine(int lastLine)
Set the last line of the parent.
|
void |
setReturnLine(int returnLine)
Set the return line of the parent.
|
SourceModel getModel()
Parent getParent()
void setFirstLine(int firstLine)
firstLine
- the first lineint getFirstLine()
void setReturnLine(int returnLine)
returnLine
- the return line of the parentdefault boolean isBeforeReturnLine(int line)
line
- the line numberint getReturnLine()
void setLastLine(int lastLine)
lastLine
- the last line of the parentint getLastLine()
void addBlock(Block block)
block
- the blockjava.util.SortedMap<java.lang.Integer,Block> getBlocks()
java.util.SortedMap<java.lang.Integer,ChildElement> getChildrenElements()
default Block getBlock(int lineNumber)
lineNumber
- the line numberdefault int countBlocks()
default Block lastBlock()
void addSentence(Sentence sentence)
sentence
- the sentencejava.util.SortedMap<java.lang.Integer,Sentence> getSentences()
void addComment(int lineNumber)
lineNumber
- the line numberboolean isComment(int lineNumber)
lineNumber
- the line numbervoid addVar(Var var)
var
- the variable declarationjava.util.SortedMap<java.lang.Integer,java.util.List<Var>> getVars()
default java.lang.String getContent()
Copyright © 2019-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence