Class NullFragmenter

  • All Implemented Interfaces:
    Fragmenter

    public class NullFragmenter
    extends java.lang.Object
    implements Fragmenter
    Fragmenter implementation which does not fragment the text. This is useful for highlighting the entire content of a document or field.
    • Constructor Summary

      Constructors 
      Constructor Description
      NullFragmenter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isNewFragment()
      Test to see if this token from the stream should be held in a new TextFragment.
      void start​(java.lang.String s, TokenStream tokenStream)
      Initializes the Fragmenter.
      • Methods inherited from class java.lang.Object

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

      • NullFragmenter

        public NullFragmenter()
    • Method Detail

      • start

        public void start​(java.lang.String s,
                          TokenStream tokenStream)
        Description copied from interface: Fragmenter
        Initializes the Fragmenter. You can grab references to the Attributes you are interested in from tokenStream and then access the values in Fragmenter.isNewFragment().
        Specified by:
        start in interface Fragmenter
        Parameters:
        s - the original source text
        tokenStream - the TokenStream to be fragmented
      • isNewFragment

        public boolean isNewFragment()
        Description copied from interface: Fragmenter
        Test to see if this token from the stream should be held in a new TextFragment. Every time this is called, the TokenStream passed to start(String, TokenStream) will have been incremented.
        Specified by:
        isNewFragment in interface Fragmenter