Class BidiRun

java.lang.Object
com.mta.tehreer.unicode.BidiRun

public class BidiRun extends Object
A BidiRun object represents a sequence of characters which have the same embedding level. The direction of run is considered right-to-left, if its embedding level is odd.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    The index after the last character of this run in source text.
    int
    The index to the first character of this run in source text.
    byte
    The embedding level of this run.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a bidi run object.
    BidiRun(int charStart, int charEnd, byte embeddingLevel)
    Constructs a bidi run object.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    boolean
    Returns true if the embedding level of this run is odd.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • charStart

      public int charStart
      The index to the first character of this run in source text.
    • charEnd

      public int charEnd
      The index after the last character of this run in source text.
    • embeddingLevel

      public byte embeddingLevel
      The embedding level of this run.
  • Constructor Details

    • BidiRun

      public BidiRun(int charStart, int charEnd, byte embeddingLevel)
      Constructs a bidi run object.
      Parameters:
      charStart - The index to the first character of run.
      charEnd - The index after the last character of run.
      embeddingLevel - The embedding level of run.
    • BidiRun

      public BidiRun()
      Constructs a bidi run object.
  • Method Details

    • isRightToLeft

      public boolean isRightToLeft()
      Returns true if the embedding level of this run is odd.
      Returns:
      true if this run is right-to-left, false otherwise.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      @NonNull public String toString()
      Overrides:
      toString in class Object