public class HitInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
charIndex |
private static java.text.BreakIterator |
charIterator |
private int |
insertionIndex |
private boolean |
leading |
private java.lang.String |
text |
Constructor and Description |
---|
HitInfo(int charIndex,
int insertionIndex,
boolean leading,
java.lang.String text)
Create a HitInfo object representing a text index and forward bias.
|
Modifier and Type | Method and Description |
---|---|
int |
getCharIndex()
The index of the character which this hit information refers to.
|
int |
getInsertionIndex()
Returns the index of the insertion position.
|
boolean |
isLeading()
Indicates whether the hit is on the leading edge of the character.
|
java.lang.String |
toString() |
private int charIndex
private boolean leading
private int insertionIndex
private java.lang.String text
private static java.text.BreakIterator charIterator
HitInfo(int charIndex, int insertionIndex, boolean leading, java.lang.String text)
charIndex
- the character index.leading
- whether the hit is on the leading edge of the character. If it is false, it represents the trailing edge.public int getCharIndex()
public boolean isLeading()
public int getInsertionIndex()
public java.lang.String toString()
toString
in class java.lang.Object