public class Match extends Object
Modifier and Type | Field and Description |
---|---|
private TermItem |
item |
private CompositeItem |
parent
The parent of the matched item
|
private int |
position
The start position of this match
|
private String |
replaceValue
The string to replace the match by, usually item.getIndexedString()
|
Constructor and Description |
---|
Match(FlattenedItem item,
String replaceValue)
Creates a match
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
TermItem |
getItem() |
CompositeItem |
getParent()
Returns the parent in which the item was matched, or null if the item was root.
|
int |
getPosition() |
String |
getReplaceValue() |
int |
hashCode() |
Item |
toItem(String label)
Returns a new item representing this match
|
private int position
private TermItem item
private String replaceValue
private CompositeItem parent
public Match(FlattenedItem item, String replaceValue)
item
- the match to addreplaceValue
- the string to replace this match by, usually the item.getIndexedString()
which is what the replace value will be if it is passed as null herepublic int getPosition()
public TermItem getItem()
public String getReplaceValue()
public CompositeItem getParent()
Copyright © 2018. All rights reserved.