Class PhraseMatcher.Phrase

java.lang.Object
com.yahoo.prelude.querytransform.PhraseMatcher.Phrase
Enclosing class:
PhraseMatcher

public static class PhraseMatcher.Phrase extends Object
Points to a collection of word items (one or more) which is matches a complete listing in an automat
  • Constructor Details

  • Method Details

    • getOwner

      public CompositeItem 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

      public String getData()
      Returns the data stored by the automaton for this phrase at this position, or null if none
    • getItem

      public TermItem getItem(int index)
      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

      public PhraseMatcher.Phrase.MatchIterator itemIterator()
      Returns the items of this phrase as a read-only iterator
    • toString

      public String toString()
      Overrides:
      toString in class Object