• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GENERATED SOURCE. DO NOT MODIFY. */
2 // © 2016 and later: Unicode, Inc. and others.
3 // License & terms of use: http://www.unicode.org/copyright.html#License
4 /*
5  *******************************************************************************
6  * Copyright (C) 2014, International Business Machines Corporation and         *
7  * others. All Rights Reserved.                                                *
8  *******************************************************************************
9  */
10 package ohos.global.icu.text;
11 
12 import java.text.CharacterIterator;
13 
14 /**
15  * The LanguageBreakEngine interface is to be used to implement any
16  * language-specific logic for break iteration.
17  */
18 interface LanguageBreakEngine {
19     /**
20      * @param c A Unicode codepoint value
21      * @return true if the engine can handle this character, false otherwise
22      */
handles(int c)23     boolean handles(int c);
24 
25     /**
26      * Implements the actual breaking logic. Find any breaks within a run in the supplied text.
27      * @param text The text to break over. The iterator is left at
28      * the end of the run of characters which the engine has handled.
29      * @param startPos The index of the beginning of the range
30      * @param endPos The index of the possible end of our range. It is possible,
31      *  however, that the range ends earlier
32      * @param foundBreaks A data structure to receive the break positions.
33      * @return the number of breaks found
34      */
findBreaks(CharacterIterator text, int startPos, int endPos, DictionaryBreakEngine.DequeI foundBreaks)35     int findBreaks(CharacterIterator text, int startPos, int endPos,
36             DictionaryBreakEngine.DequeI foundBreaks);
37 }
38 
39 
40 
41