Class 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
    • Method Detail

      • 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