Class IndexedRun

java.lang.Object
org.wickedsource.docxstamper.replace.IndexedRun

public class IndexedRun extends Object
  • Constructor Details

    • IndexedRun

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

    • 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.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object