Class Match
- java.lang.Object
-
- com.yahoo.prelude.semantics.engine.Match
-
public class Match extends Object
A match- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description Match(FlattenedItem item, String replaceValue)
Creates a match
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 matchItem
toItem(String label, String term)
Returns a new item representing this matchString
toString()
-
-
-
Constructor Detail
-
Match
public Match(FlattenedItem item, String replaceValue)
Creates a match- Parameters:
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 here
-
-
Method Detail
-
getPosition
public int getPosition()
-
getItem
public TermItem getItem()
-
getReplaceValue
public String getReplaceValue()
-
getParent
public CompositeItem getParent()
Returns the parent in which the item was matched, or null if the item was root. Note that the item may subsequently have been removed, so it does not necessarily have this parent
-
-