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

    • StructuredTextOffsets

      public StructuredTextOffsets()
      Default constructor
  • Method Details

    • getPrefixLength

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

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

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

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

      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

      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

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