Interface Block

    • Method Detail

      • getLines

        List<? extends Line> getLines()
        Returns a List view of the Lines held by this Block. The returned List is guaranteed to offer efficient random access.
        Since:
        v1.4
      • getLine

        Line getLine​(int idx)
        Returns the Line at the given index.
        Since:
        v1.4
      • getLineCnt

        int getLineCnt()
        Returns the number of Lines held by this Block.
        Since:
        v1.4
      • removeLine

        Line removeLine​(int idx)

        Removes the Line at the given index from this Block, and returns it.

        Since:
        v1.4
      • crop

        Block crop​(Region area)
        Returns a Block that contains only the content held by this Block that intersects the given "query" area. If all of the content held by this instance is intersected by the query area, then this instance may be returned unchanged. If no content in this Block intersects the query area, then an empty Block will be returned.
      • guessDirection

        Direction guessDirection()
        Returns the Direction of this block (in aggregate of all of its lines and child blocks, if any), determined via a heuristic that surveys all included text content. This value is what determines the default base direction used when invoking OutputSource.pipe(OutputHandler).
        Since:
        v4.0