Class StructuredTextOffsets

java.lang.Object
org.eclipse.equinox.bidi.custom.StructuredTextOffsets

public class StructuredTextOffsets extends Object
Provides various services related to managing the array of offsets where directional formatting characters should be inserted in a source string.
  • Constructor Details Link icon

    • StructuredTextOffsets Link icon

      public StructuredTextOffsets()
      Default constructor
  • Method Details Link icon

    • getPrefixLength Link icon

      public int getPrefixLength()
      Returns:
      the stored prefix length
    • setPrefixLength Link icon

      public void setPrefixLength(int prefLen)
      Stores the prefix length
      Parameters:
      prefLen - value assigned to the prefix length
    • getCount Link icon

      public int getCount()
      Gets the number of used entries in the offsets array.
      Returns:
      the number of used entries in the offsets array.
    • clear Link icon

      public void clear()
      Marks that all entries in the offsets array are unused.
    • getOffset Link icon

      public int getOffset(int index)
      Gets the value of a specified entry in the offsets array.
      Parameters:
      index - the index of the entry of interest.
      Returns:
      the value of the specified entry.
    • insertOffset Link icon

      public void insertOffset(StructuredTextCharTypes charTypes, int offset)
      Inserts an offset value in the offset array so that the array stays in ascending order.
      Parameters:
      charTypes - an object whose methods can be useful to the handler.
      offset - the value to insert.
    • getOffsets Link icon

      public int[] getOffsets()
      Gets all and only the used offset entries.
      Returns:
      the current used entries of the offsets array.