public static class PositionTracker.ForwardPositionTracker extends Object
| Constructor and Description |
|---|
ForwardPositionTracker() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPositionChange(int pos,
int modifier) |
void |
closeRun()
Closes the current changing run by Merging new position changes into the existing position change map
Do this every time you ran once over the text making changes to be tracked
|
boolean |
hasBeenCutAway(Integer pos)
tells whether a position in the original stream has been cut away by some change operation,
such that translating it usually would make not to much sense
|
Integer |
translatePosition(Integer pos) |
Integer |
translatePositionExactly(Integer pos)
also handles positions inside text parts that have been cut out properly
TODO: current version ONLY WORKS SECURELY WHEN THERE IS ONLY ONE POSITION CHANGE RUN WITHOUT OVERLAPPING CHANGES!
as soon as there are more than one change runs, or changes that overlap, we would need to check all following changes instead of only the next one
|
public void addPositionChange(int pos,
int modifier)
public void closeRun()
public boolean hasBeenCutAway(Integer pos)
public Integer translatePositionExactly(Integer pos)
Copyright © 2018. All rights reserved.