Class Snippet

  • public class Snippet
    extends java.lang.Object
    Represents a scored highlighted snippet. It's our own arbitrary object that we get back from the unified highlighter when highlighting a document. Every snippet contains its formatted text and its score. The score is needed in case we want to sort snippets by score, they get sorted by position in the text by default.
    • Constructor Summary

      Constructor Description
      Snippet​(java.lang.String text, float score, boolean isHighlighted)  
    • Method Summary

      Modifier and Type Method Description
      float getScore()  
      java.lang.String getText()  
      boolean isHighlighted()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Snippet

        public Snippet​(java.lang.String text,
                       float score,
                       boolean isHighlighted)
    • Method Detail

      • getText

        public java.lang.String getText()
      • getScore

        public float getScore()
      • isHighlighted

        public boolean isHighlighted()