public class ReplacedTextMapper extends Object
This is needed when the original based sequence needs to be un-escaped but offsets to original escaped text are needed.
These replacements can be nested so that you can track replacements of replaced text. To add nested replacements use startNestedReplacement()
when isModified() returns true then the text mapper is already used and nested replacements need to be applied
| Constructor and Description |
|---|
ReplacedTextMapper(BasedSequence original) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOriginalText(int startIndex,
int endIndex) |
void |
addReplacedText(int startIndex,
int endIndex,
BasedSequence replacedSequence) |
ReplacedTextMapper |
getParent() |
ArrayList<ReplacedTextRegion> |
getRegions() |
int |
getReplacedLength() |
ArrayList<BasedSequence> |
getReplacedSegments() |
BasedSequence |
getReplacedSequence() |
boolean |
isFinalized() |
boolean |
isModified() |
int |
originalOffset(int replacedIndex) |
void |
startNestedReplacement(BasedSequence sequence) |
public ReplacedTextMapper(BasedSequence original)
public void startNestedReplacement(BasedSequence sequence)
public boolean isModified()
public boolean isFinalized()
public ReplacedTextMapper getParent()
public void addReplacedText(int startIndex,
int endIndex,
BasedSequence replacedSequence)
public void addOriginalText(int startIndex,
int endIndex)
public ArrayList<ReplacedTextRegion> getRegions()
public ArrayList<BasedSequence> getReplacedSegments()
public BasedSequence getReplacedSequence()
public int getReplacedLength()
public int originalOffset(int replacedIndex)
Copyright © 2019. All rights reserved.