Interface PhraseHandler
-
public interface PhraseHandlerHandler interface used for traversing aPhrasetree.Custom traversal/modification of phrases can be created by implementing this interface and passing it to
Phrase.rewrite(PhraseHandler)orPhrase.rewriteChildren(PhraseHandler).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PhrasehandlePhrase(Phrase phrase)Method called for handling an encounteredPhraseduring traversal.
-
-
-
Method Detail
-
handlePhrase
Phrase handlePhrase(Phrase phrase)
Method called for handling an encounteredPhraseduring traversal.Return the passed in
phraseif modified in place or no modification to tree should be made. Return a newPhraseinstance to replace the passed inphrasein the query tree. Returnnullto remove the phrase from the tree.NOTE: returning a new
Phraseinstance ornullwill result in stopping any recursive traversal.
-
-