Class 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 Detail

      • StructuredTextOffsets

        public StructuredTextOffsets()
        Default constructor
    • Method Detail

      • getPrefixLength

        public int getPrefixLength()
        the stored prefix length
      • setPrefixLength

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

        public int getCount()
        Gets the number of used entries in the offsets array.
        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.
        index - the index of the entry of interest.
        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.
        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.
        the current used entries of the offsets array.