Package 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
  Description
  `protected CharHashSet`
  `boundaryChars`
  `static final char[]`
  `DEFAULT_BOUNDARY_CHARS`
  `static final int`
  `DEFAULT_MAX_SCAN`
  `protected int`
  `maxScan`

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  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 Details

  - ### DEFAULT_MAX_SCAN

    public static final int DEFAULT_MAX_SCAN
    See Also:
      - Constant Field Values

  - ### DEFAULT_BOUNDARY_CHARS

    public static final char[] DEFAULT_BOUNDARY_CHARS

  - ### maxScan

    protected int maxScan

  - ### boundaryChars

    protected CharHashSet boundaryChars

- ## Constructor Details

  - ### SimpleBoundaryScanner

    public SimpleBoundaryScanner()

  - ### SimpleBoundaryScanner

    public SimpleBoundaryScanner(int maxScan)

  - ### SimpleBoundaryScanner

    public SimpleBoundaryScanner(Character[] boundaryChars)

  - ### SimpleBoundaryScanner

    public SimpleBoundaryScanner(int maxScan, char[] boundaryChars)

  - ### SimpleBoundaryScanner

    public SimpleBoundaryScanner(int maxScan, Character[] boundaryChars)

  - ### SimpleBoundaryScanner

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

- ## Method Details

  - ### 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