public class BadWord
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
REASON_DUPLICATE
BadWord reason, duplicate word occurrence.
|
static int |
REASON_SPELLING
BadWord reason, incorrect spelling.
|
Constructor and Description |
---|
BadWord(java.lang.String word,
int caretStart,
int caretEnd)
Constructs a BadWord instance.
|
BadWord(java.lang.String word,
int caretStart,
int caretEnd,
int reason)
Constructs a BadWord instance.
|
Modifier and Type | Method and Description |
---|---|
BadWord |
copy() |
int |
getEndPosition()
Gets the position of the end of this word in the main text.
|
int |
getReason() |
int |
getStartPosition()
Gets the position of the start of this word in the main text.
|
java.lang.String |
getWord()
Gets the String of this bad word.
|
void |
setStartPosition(int p)
Sets the position of the start of this word in the main text.
|
void |
setWord(java.lang.String word)
Sets the word content
|
void |
shift(int delta) |
public static int REASON_DUPLICATE
public static int REASON_SPELLING
public BadWord(java.lang.String word, int caretStart, int caretEnd)
word
- the word String that is misspeltcaretStart
- the position in the original textcaretEnd
- the end position in the textpublic BadWord(java.lang.String word, int caretStart, int caretEnd, int reason)
word
- the word String that is misspeltcaretStart
- the position in the original textcaretEnd
- the end position in the textpublic int getStartPosition()
public void setStartPosition(int p)
public int getEndPosition()
public int getReason()
public java.lang.String getWord()
public void setWord(java.lang.String word)
word
- the wordpublic void shift(int delta)
public BadWord copy()
Copyright © 2002-2016 Keyoti Inc. All Rights Reserved.