Class IndexedRun
- java.lang.Object
-
- org.wickedsource.docxstamper.replace.IndexedRun
-
public class IndexedRun extends Object
-
-
Constructor Summary
Constructors Constructor Description IndexedRun(int startIndex, int endIndex, int indexInParent, org.docx4j.wml.R run)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)intgetEndIndex()intgetIndexInParent()intgetLength()org.docx4j.wml.RgetRun()intgetStartIndex()inthashCode()booleanisTouchedByRange(int globalStartIndex, int globalEndIndex)Determines whether the specified range of start and end index touches this run.voidreplace(int globalStartIndex, int globalEndIndex, String replacement)Replaces the substring starting at the given index with the given replacement string.StringtoString()
-
-
-
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.
-
-