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 */ 10package android.icu.text; 11 12import java.text.CharacterIterator; 13 14/** 15 * The LanguageBreakEngine interface is to be used to implement any 16 * language-specific logic for break iteration. 17 */ 18interface LanguageBreakEngine { 19 /** 20 * @param c A Unicode codepoint value 21 * @param breakType The kind of break iterator that is wanting to make use 22 * of this engine - character, word, line, sentence 23 * @return true if the engine can handle this character, false otherwise 24 */ 25 boolean handles(int c, int breakType); 26 27 /** 28 * Implements the actual breaking logic. Find any breaks within a run in the supplied text. 29 * @param text The text to break over. The iterator is left at 30 * the end of the run of characters which the engine has handled. 31 * @param startPos The index of the beginning of the range 32 * @param endPos The index of the possible end of our range. It is possible, 33 * however, that the range ends earlier 34 * @param breakType The kind of break iterator that is wanting to make use 35 * of this engine - character, word, line, sentence 36 * @param foundBreaks A data structure to receive the break positions. 37 * @return the number of breaks found 38 */ 39 int findBreaks(CharacterIterator text, int startPos, int endPos, 40 int breakType, DictionaryBreakEngine.DequeI foundBreaks); 41} 42 43 44 45