Interface SentenceI
-
- All Superinterfaces:
Serializable
public interface SentenceI extends Serializable
This interface represents a sentence identified in the user input text. It provides access to the sentence text, its start position in the user input text, and the list ofwordsidentified in the sentence.Instances of
SentenceI/WordDataImust be created with methodsInputProcessor.createSentence(java.lang.String, int)/InputProcessor.createWordData(java.lang.String, int)(to be called from an input processor), andInputProcessorChain.createSentence(java.lang.String, int)/InputProcessorChain.createWordData(java.lang.String, int)(to be called from outside of an input processor).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetBeginIndex()Returns the character index of the beginning of this sentence in the user input text.intgetEndIndex()Returns the index of the character right after the end of this sentence in the user input text.StringgetText()Returns the original text of this sentence.List<WordDataI>getWords()Returns the words of this sentence.voidsetBeginIndex(int _iBeginIndex)Sets the character index of the beginning of this sentence in the user input text to the given value.voidsetText(String _sText)Sets the original text of this sentence to the given value.
-
-
-
Method Detail
-
getText
String getText()
Returns the original text of this sentence.
-
setText
void setText(String _sText)
Sets the original text of this sentence to the given value.- Throws:
IllegalArgumentException- if the given argument isnull
-
getBeginIndex
int getBeginIndex()
Returns the character index of the beginning of this sentence in the user input text.
-
setBeginIndex
void setBeginIndex(int _iBeginIndex)
Sets the character index of the beginning of this sentence in the user input text to the given value.- Throws:
IllegalArgumentException- if the given value is negative
-
getEndIndex
int getEndIndex()
Returns the index of the character right after the end of this sentence in the user input text.
-
getWords
List<WordDataI> getWords()
Returns the words of this sentence. AnInputProcessormay add / modify / delete entries.Instances of
WordDataImust be created with methodInputProcessor.createWordData(java.lang.String, int)(to be called from an input processor) andInputProcessorChain.createWordData(java.lang.String, int)(to be called from outside of an input processor).
-
-