Class IndexedRun


  • public class IndexedRun
    extends Object
    • Constructor Detail

      • IndexedRun

        public IndexedRun​(int startIndex,
                          int endIndex,
                          int indexInParent,
                          org.docx4j.wml.R run)
    • Method Detail

      • getLength

        public int getLength()
      • getStartIndex

        public int getStartIndex()
      • getEndIndex

        public int getEndIndex()
      • getIndexInParent

        public int getIndexInParent()
      • getRun

        public org.docx4j.wml.R getRun()
      • isTouchedByRange

        public boolean isTouchedByRange​(int globalStartIndex,
                                        int globalEndIndex)
        Determines whether the specified range of start and end index touches this run.
      • replace

        public void replace​(int globalStartIndex,
                            int globalEndIndex,
                            String replacement)
        Replaces the substring starting at the given index with the given replacement string.
        Parameters:
        globalStartIndex - the global index (meaning the index relative to multiple aggregated runs) at which to start the replacement.
        globalEndIndex - the global index (meaning the index relative to multiple aggregated runs) at which to end the replacement.
        replacement - the string to replace the substring at the specified global index.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object