org.eclipse.equinox.bidi.custom

## 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 Summary

Constructors
Constructor and Description
`StructuredTextOffsets()` Default constructor

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `clear()` Marks that all entries in the offsets array are unused.
`int` `getCount()` Gets the number of used entries in the offsets array.
`int` `getOffset(int index)` Gets the value of a specified entry in the offsets array.
`int[]` `getOffsets()` Gets all and only the used offset entries.
`int` `getPrefixLength()`
`void` `insertOffset(StructuredTextCharTypes charTypes, int offset)` Inserts an offset value in the offset array so that the array stays in ascending order.
`void` `setPrefixLength(int prefLen)` Stores the prefix length

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### StructuredTextOffsets

    public StructuredTextOffsets()

Default constructor

### Method Detail

#### 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.