Interface UITextInputTokenizer

  • All Known Implementing Classes:
    UITextInputStringTokenizer

    public interface UITextInputTokenizer
    A tokenizer allows the text input system to evaluate text units of varying granularity.
    • Method Detail

      • isPositionAtBoundaryInDirection

        boolean isPositionAtBoundaryInDirection​(UITextPosition position,
                                                long granularity,
                                                long direction)
        Returns YES only if a position is at a boundary of a text unit of the specified granularity in the particular direction.
      • isPositionWithinTextUnitInDirection

        boolean isPositionWithinTextUnitInDirection​(UITextPosition position,
                                                    long granularity,
                                                    long direction)
        Returns YES if position is within a text unit of the given granularity. If the position is at a boundary, returns YES only if the boundary is part of the text unit in the given direction.
      • positionFromPositionToBoundaryInDirection

        UITextPosition positionFromPositionToBoundaryInDirection​(UITextPosition position,
                                                                 long granularity,
                                                                 long direction)
        Returns the next boundary position of a text unit of the given granularity in the given direction, or nil if there is no such position.
      • rangeEnclosingPositionWithGranularityInDirection

        UITextRange rangeEnclosingPositionWithGranularityInDirection​(UITextPosition position,
                                                                     long granularity,
                                                                     long direction)
        Returns range of the enclosing text unit of the given granularity, or nil if there is no such enclosing unit. Whether a boundary position is enclosed depends on the given direction, using the same rule as isPosition:withinTextUnit:inDirection: