Package org.drools.drl.parser.lang
Class DroolsSentence
- java.lang.Object
-
- org.drools.drl.parser.lang.DroolsSentence
-
public class DroolsSentence extends Object
Class that represents a DroolsLanguage sentence. To be used by IDE.
-
-
Constructor Summary
Constructors Constructor Description DroolsSentence()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddContent(int contextInfo)Add a location to the contentvoidaddContent(DroolsToken token)Add a token to the content and sets char offset infoLinkedListgetContent()getter of sentence contentintgetEndOffset()getter for end char offsetintgetStartOffset()getter for start char offsetDroolsSentenceTypegetType()getter of sentence typevoidreverseContent()Reverses the content linked listvoidsetEndOffset(int endOffset)setter for end char offsetvoidsetStartOffset(int startOffset)setter for start char offsetvoidsetType(DroolsSentenceType type)setter of sentence type
-
-
-
Method Detail
-
getType
public DroolsSentenceType getType()
getter of sentence type- Returns:
- sentence type
- See Also:
DroolsSentenceType
-
setType
public void setType(DroolsSentenceType type)
setter of sentence type- Parameters:
type- sentence type- See Also:
DroolsSentenceType
-
getStartOffset
public int getStartOffset()
getter for start char offset- Returns:
- start char offset
-
setStartOffset
public void setStartOffset(int startOffset)
setter for start char offset- Parameters:
startOffset- start char offset
-
getEndOffset
public int getEndOffset()
getter for end char offset- Returns:
- end char offset
-
setEndOffset
public void setEndOffset(int endOffset)
setter for end char offset- Parameters:
endOffset- end char offset
-
getContent
public LinkedList getContent()
getter of sentence content- Returns:
- linked list that stores DroolsTokens and Locations
-
reverseContent
public void reverseContent()
Reverses the content linked list
-
addContent
public void addContent(DroolsToken token)
Add a token to the content and sets char offset info- Parameters:
token- token to be stored
-
addContent
public void addContent(int contextInfo)
Add a location to the content- Parameters:
contextInfo- location identifier- See Also:
Location
-
-