Interface Word

  • All Superinterfaces:
    OutputSource, Span

    public interface Word
    extends Span
    A Word Span is a contiguous run of characters (TextUnits) within a single Line. Note that "word" here should not be inferred to carry any specific linguistic meaning: a Word is only indicative of character adjacency (i.e. no intervening whitespace), not the result of any kind of natural language analysis. Thus, a line of text like this:
         she picked........the flower
     
    contains 3 "Word"s (the second being picked......the).
    Since:
    v4.0
    • Method Detail

      • start

        int start()
        Returns the index of the first TextUnit within this Word.
      • len

        int len()
        Returns a count of how many TextUnits are within this Word.
      • direction

        Direction direction()
        Returns the direction of the text flow within this Word. This value determines the iteration order of the TextUnits within this Word.