org.apache.lucene.search.vectorhighlight

## Class SimpleBoundaryScanner

- java.lang.Object
- - org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

- All Implemented Interfaces:
    BoundaryScanner

      public class SimpleBoundaryScanner
      extends Object
      implements BoundaryScanner

  Simple boundary scanner implementation that divides fragments based on a set of separator characters.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Set<Character>` | `boundaryChars`
    `static Character[]` | `DEFAULT_BOUNDARY_CHARS`
    `static int` | `DEFAULT_MAX_SCAN`
    `protected int` | `maxScan`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleBoundaryScanner()`
    `SimpleBoundaryScanner(Character[] boundaryChars)`
    `SimpleBoundaryScanner(int maxScan)`
    `SimpleBoundaryScanner(int maxScan, Character[] boundaryChars)`
    `SimpleBoundaryScanner(int maxScan, Set<Character> boundaryChars)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `findEndOffset(StringBuilder buffer, int start)` Scan forward to find start offset.
    `int` | `findStartOffset(StringBuilder buffer, int start)` Scan backward to find end offset.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_MAX_SCAN

          public static final int DEFAULT_MAX_SCAN

      See Also:
        Constant Field Values

    - #### DEFAULT_BOUNDARY_CHARS

          public static final Character[] DEFAULT_BOUNDARY_CHARS

    - #### maxScan

          protected int maxScan

    - #### boundaryChars

          protected Set<Character> boundaryChars

  - ### Constructor Detail

    - #### SimpleBoundaryScanner

          public SimpleBoundaryScanner()

    - #### SimpleBoundaryScanner

          public SimpleBoundaryScanner(int maxScan)

    - #### SimpleBoundaryScanner

          public SimpleBoundaryScanner(Character[] boundaryChars)

    - #### SimpleBoundaryScanner

          public SimpleBoundaryScanner(int maxScan,
                                       Character[] boundaryChars)

    - #### SimpleBoundaryScanner

          public SimpleBoundaryScanner(int maxScan,
                                       Set<Character> boundaryChars)

  - ### Method Detail

    - #### findStartOffset

          public int findStartOffset(StringBuilder buffer,
                                     int start)

      Description copied from interface: `BoundaryScanner`
      Scan backward to find end offset.
      Specified by:
        `findStartOffset` in interface `BoundaryScanner`
      Parameters:
        `buffer` - scanned object
        `start` - start offset to begin
      Returns:
        the found start offset

    - #### findEndOffset

          public int findEndOffset(StringBuilder buffer,
                                   int start)

      Description copied from interface: `BoundaryScanner`
      Scan forward to find start offset.
      Specified by:
        `findEndOffset` in interface `BoundaryScanner`
      Parameters:
        `buffer` - scanned object
        `start` - start offset to begin
      Returns:
        the found end offset

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.