Class UnhandledBreakEngine

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) UnicodeSet fHandled  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int findBreaks​(java.text.CharacterIterator text, int startPos, int endPos, DictionaryBreakEngine.DequeI foundBreaks, boolean isPhraseBreaking)
      Implements the actual breaking logic.
      void handleChar​(int c)
      Update the set of unhandled characters to include all that have the same script as c.
      boolean handles​(int c)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UnhandledBreakEngine

        public UnhandledBreakEngine()
    • Method Detail

      • handles

        public boolean handles​(int c)
        Specified by:
        handles in interface LanguageBreakEngine
        Parameters:
        c - A Unicode codepoint value
        Returns:
        true if the engine can handle this character, false otherwise
      • findBreaks

        public int findBreaks​(java.text.CharacterIterator text,
                              int startPos,
                              int endPos,
                              DictionaryBreakEngine.DequeI foundBreaks,
                              boolean isPhraseBreaking)
        Description copied from interface: LanguageBreakEngine
        Implements the actual breaking logic. Find any breaks within a run in the supplied text.
        Specified by:
        findBreaks in interface LanguageBreakEngine
        Parameters:
        text - The text to break over. The iterator is left at the end of the run of characters which the engine has handled.
        startPos - The index of the beginning of the range
        endPos - The index of the possible end of our range. It is possible, however, that the range ends earlier
        foundBreaks - A data structure to receive the break positions.
        Returns:
        the number of breaks found
      • handleChar

        public void handleChar​(int c)
        Update the set of unhandled characters to include all that have the same script as c. May be called concurrently with handles() or findBreaks(). Must not be called concurrently with itself.