Class SingleFragListBuilder

  • All Implemented Interfaces:
    FragListBuilder

    public class SingleFragListBuilder
    extends java.lang.Object
    implements FragListBuilder
    An implementation class of FragListBuilder that generates one FieldFragList.WeightedFragInfo object. Typical use case of this class is that you can get an entire field contents by using both of this class and SimpleFragmentsBuilder.
     FastVectorHighlighter h = new FastVectorHighlighter( true, true,
       new SingleFragListBuilder(), new SimpleFragmentsBuilder() );
     
    • Constructor Detail

      • SingleFragListBuilder

        public SingleFragListBuilder()
    • Method Detail

      • createFieldFragList

        public FieldFragList createFieldFragList​(FieldPhraseList fieldPhraseList,
                                                 int fragCharSize)
        Description copied from interface: FragListBuilder
        create a FieldFragList.
        Specified by:
        createFieldFragList in interface FragListBuilder
        Parameters:
        fieldPhraseList - FieldPhraseList object
        fragCharSize - the length (number of chars) of a fragment
        Returns:
        the created FieldFragList object