Stay organized with collections
Save and categorize content based on your preferences.
BidiRun
public
class
BidiRun
extends Object
A BidiRun represents a sequence of characters at the same embedding level.
The Bidi algorithm decomposes a piece of text into sequences of characters
at the same embedding level, each such sequence is called a "run".
A BidiRun represents such a run by storing its essential properties,
but does not duplicate the characters which form the run.
The "limit" of the run is the position just after the
last character, i.e., one more than that position.
This class has no public constructor, and its members cannot be
modified by users.
Summary
Public methods |
byte
|
getDirection()
Get direction of run
|
byte
|
getEmbeddingLevel()
Get level of run
|
int
|
getLength()
Get length of run
|
int
|
getLimit()
Get position of one character after the end of the run in the source text
|
int
|
getStart()
Get the first logical position of the run in the source text
|
boolean
|
isEvenRun()
Check if run level is even
|
boolean
|
isOddRun()
Check if run level is odd
|
String
|
toString()
String to display run
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public methods
getDirection
public byte getDirection ()
Get direction of run
getEmbeddingLevel
public byte getEmbeddingLevel ()
Get level of run
getLength
public int getLength ()
Get length of run
getLimit
public int getLimit ()
Get position of one character after the end of the run in the source text
getStart
public int getStart ()
Get the first logical position of the run in the source text
isEvenRun
public boolean isEvenRun ()
Check if run level is even
Returns |
boolean |
true if the embedding level of this run is even, i.e. it is a
left-to-right run. |
isOddRun
public boolean isOddRun ()
Check if run level is odd
Returns |
boolean |
true if the embedding level of this run is odd, i.e. it is a
right-to-left run. |
toString
public String toString ()
String to display run
Returns |
String |
a string representation of the object. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# BidiRun\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nBidiRun\n=======\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/icu/text/BidiRun \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\nclass\nBidiRun\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.icu.text.BidiRun |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA BidiRun represents a sequence of characters at the same embedding level.\nThe Bidi algorithm decomposes a piece of text into sequences of characters\nat the same embedding level, each such sequence is called a \"run\".\n\nA BidiRun represents such a run by storing its essential properties,\nbut does not duplicate the characters which form the run.\n\nThe \"limit\" of the run is the position just after the\nlast character, i.e., one more than that position.\n\nThis class has no public constructor, and its members cannot be\nmodified by users. \n**See also:**\n\n- [Bidi](/reference/android/icu/text/Bidi)\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| ` byte` | ` `[getDirection](/reference/android/icu/text/BidiRun#getDirection())`() ` Get direction of run |\n| ` byte` | ` `[getEmbeddingLevel](/reference/android/icu/text/BidiRun#getEmbeddingLevel())`() ` Get level of run |\n| ` int` | ` `[getLength](/reference/android/icu/text/BidiRun#getLength())`() ` Get length of run |\n| ` int` | ` `[getLimit](/reference/android/icu/text/BidiRun#getLimit())`() ` Get position of one character after the end of the run in the source text |\n| ` int` | ` `[getStart](/reference/android/icu/text/BidiRun#getStart())`() ` Get the first logical position of the run in the source text |\n| ` boolean` | ` `[isEvenRun](/reference/android/icu/text/BidiRun#isEvenRun())`() ` Check if run level is even |\n| ` boolean` | ` `[isOddRun](/reference/android/icu/text/BidiRun#isOddRun())`() ` Check if run level is odd |\n| ` `[String](/reference/java/lang/String) | ` `[toString](/reference/android/icu/text/BidiRun#toString())`() ` String to display run |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nPublic methods\n--------------\n\n### getDirection\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic byte getDirection ()\n```\n\nGet direction of run\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `byte` | \u003cbr /\u003e |\n\n### getEmbeddingLevel\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic byte getEmbeddingLevel ()\n```\n\nGet level of run\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|--------|\n| `byte` | \u003cbr /\u003e |\n\n### getLength\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic int getLength ()\n```\n\nGet length of run\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |\n\n### getLimit\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic int getLimit ()\n```\n\nGet position of one character after the end of the run in the source text\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |\n\n### getStart\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic int getStart ()\n```\n\nGet the first logical position of the run in the source text\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |\n\n### isEvenRun\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic boolean isEvenRun ()\n```\n\nCheck if run level is even\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|-----------------------------------------------------------------------------------------|\n| `boolean` | true if the embedding level of this run is even, i.e. it is a left-to-right run. \u003cbr /\u003e |\n\n### isOddRun\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic boolean isOddRun ()\n```\n\nCheck if run level is odd\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|----------------------------------------------------------------------------------------|\n| `boolean` | true if the embedding level of this run is odd, i.e. it is a right-to-left run. \u003cbr /\u003e |\n\n### toString\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic String toString ()\n```\n\nString to display run\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------------------------------------|-----------------------------------------------|\n| [String](/reference/java/lang/String) | a string representation of the object. \u003cbr /\u003e |"]]