Class BreakIteratorBoundaryScanner
- java.lang.Object
-
- org.apache.lucene.search.vectorhighlight.BreakIteratorBoundaryScanner
-
- All Implemented Interfaces:
BoundaryScanner
public class BreakIteratorBoundaryScanner extends java.lang.Object implements BoundaryScanner
ABoundaryScanner
implementation that usesBreakIterator
to find boundaries in the text.- See Also:
BreakIterator
-
-
Constructor Summary
Constructors Constructor Description BreakIteratorBoundaryScanner(java.text.BreakIterator bi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
findEndOffset(java.lang.StringBuilder buffer, int start)
Scan forward to find start offset.int
findStartOffset(java.lang.StringBuilder buffer, int start)
Scan backward to find end offset.
-
-
-
Method Detail
-
findStartOffset
public int findStartOffset(java.lang.StringBuilder buffer, int start)
Description copied from interface:BoundaryScanner
Scan backward to find end offset.- Specified by:
findStartOffset
in interfaceBoundaryScanner
- Parameters:
buffer
- scanned objectstart
- start offset to begin- Returns:
- the found start offset
-
findEndOffset
public int findEndOffset(java.lang.StringBuilder buffer, int start)
Description copied from interface:BoundaryScanner
Scan forward to find start offset.- Specified by:
findEndOffset
in interfaceBoundaryScanner
- Parameters:
buffer
- scanned objectstart
- start offset to begin- Returns:
- the found end offset
-
-