org.apache.fop.complexscripts.bidi

## Class InlineRun

- java.lang.Object
- - org.apache.fop.complexscripts.bidi.InlineRun

-     public class InlineRun
      extends Object

  The `InlineRun` class is a utility class, the instances of which are used to capture a sequence of reordering levels associated with an inline area.

  This work was originally authored by Glenn Adams (gadams@apache.org).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InlineRun(InlineArea inline, int[] levels)` Primary constructor.
    `InlineRun(InlineArea inline, int level, int count)` Alternate constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `InlineArea` | `getInline()` Obtain inline area that generated this inline run.
    `int` | `getMaxLevel()` Obtain maximum bidi level for this run.
    `int` | `getMinLevel()` Obtain minimum bidi level for this run.
    `int` | `hashCode()`
    `boolean` | `isHomogenous()` Determine if this run has homogenous (same valued) bidi levels.
    `boolean` | `maybeNeedsMirroring()` Determine if run needs mirroring.
    `void` | `maybeReverseWord(boolean mirror)` Reverse inline area if it is a word area and it requires reversal.
    `void` | `reverse()` Reverse run (by incrementing reversal count, not actually reversing).
    `List` | `split()` Split this inline run into homogenous runs.
    `String` | `toString()`
    `void` | `updateMinMax(int[] mm)` Update a min/max array to correspond with this run's min/max values.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### InlineRun

          public InlineRun(InlineArea inline,
                           int[] levels)

      Primary constructor.
      Parameters:
        `inline` - which generated this inline run
        `levels` - levels array

    - #### InlineRun

          public InlineRun(InlineArea inline,
                           int level,
                           int count)

      Alternate constructor.
      Parameters:
        `inline` - which generated this inline run
        `level` - for each index
        `count` - of indices

  - ### Method Detail

    - #### getInline

          public InlineArea getInline()

      Obtain inline area that generated this inline run.
      Returns:
        inline area that generated this inline run.

    - #### getMinLevel

          public int getMinLevel()

      Obtain minimum bidi level for this run.
      Returns:
        minimum bidi level

    - #### getMaxLevel

          public int getMaxLevel()

      Obtain maximum bidi level for this run.
      Returns:
        maximum bidi level

    - #### isHomogenous

          public boolean isHomogenous()

      Determine if this run has homogenous (same valued) bidi levels.
      Returns:
        true if homogenous

    - #### split

          public List split()

      Split this inline run into homogenous runs.
      Returns:
        list of new runs

    - #### updateMinMax

          public void updateMinMax(int[] mm)

      Update a min/max array to correspond with this run's min/max values.
      Parameters:
        `mm` - reference to min/max array

    - #### maybeNeedsMirroring

          public boolean maybeNeedsMirroring()

      Determine if run needs mirroring.
      Returns:
        true if run is homogenous and (positive) odd (i.e., right to left)

    - #### reverse

          public void reverse()

      Reverse run (by incrementing reversal count, not actually reversing).

    - #### maybeReverseWord

          public void maybeReverseWord(boolean mirror)

      Reverse inline area if it is a word area and it requires reversal.
      Parameters:
        `mirror` - if true then also mirror characters

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2023 Apache Software Foundation. All rights reserved.