Package com.yahoo.prelude.querytransform
Class PhraseMatcher.Phrase
java.lang.Object
com.yahoo.prelude.querytransform.PhraseMatcher.Phrase
- Enclosing class:
- PhraseMatcher
Points to a collection of word items (one or more)
which is matches a complete listing in an automat
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the length of the underlying phrasegetData()
Returns the data stored by the automaton for this phrase at this position, or null if nonegetItem
(int index) Returns the n'th item in this, throws if index out of boundsint
getOwner()
Returns the owner, or null if this is a single item phrase with no ownerint
boolean
Returns true if this phrase contains all the words of the owner, or if there is no ownerReturns the items of this phrase as a read-only iteratorvoid
remove()
Removes the word items of this phrase.void
replace()
Replaces the words items of this phrase with a phrase item.toString()
-
Constructor Details
-
Phrase
-
-
Method Details
-
getOwner
Returns the owner, or null if this is a single item phrase with no owner -
getStartIndex
public int getStartIndex() -
getLength
public int getLength() -
getData
Returns the data stored by the automaton for this phrase at this position, or null if none -
getItem
Returns the n'th item in this, throws if index out of bounds -
isComplete
public boolean isComplete()Returns true if this phrase contains all the words of the owner, or if there is no owner -
replace
public void replace()Replaces the words items of this phrase with a phrase item. Does nothing if this is not a composite match -
remove
public void remove()Removes the word items of this phrase. Does nothing nuless this is a composite -
getBackedLength
public int getBackedLength()Returns the length of the underlying phrase -
itemIterator
Returns the items of this phrase as a read-only iterator -
toString
-