public class RepositioningInfo extends ArrayList<RepositioningInfo.PositionInfo>
Modifier and Type | Class and Description |
---|---|
class |
RepositioningInfo.PositionInfo
Just information keeper inner class.
|
modCount
Constructor and Description |
---|
RepositioningInfo()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addPositionInfo(long origPos,
long origLength,
long currPos,
long currLength)
Create a new position information record.
|
void |
correctInformation(long originalPos,
long origLen,
long newLen)
Correct the RepositioningInfo structure for shrink/expand changes.
|
void |
correctInformationOriginalMove(long originalPos,
long moveLen)
Correct the original position information in the records.
|
long |
getExtractedPos(long absPos)
Compute position in extracted content by position in the original content.
|
long |
getExtractedPosFlow(long absPos)
Not finished yet
|
int |
getIndexByOriginalPosition(long absPos)
Return the position info index containing @param absPos
If there is no such position info return -1.
|
int |
getIndexByOriginalPositionFlow(long absPos)
Return the position info index containing @param absPos
or the index of record before this position.
|
long |
getOriginalPos(long relPos) |
long |
getOriginalPos(long relPos,
boolean afterChar)
Compute position in original content by position in the extracted content.
|
long |
getOriginalPosFlow(long relPos)
Not finished yet
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public void addPositionInfo(long origPos, long origLength, long currPos, long currLength)
public long getExtractedPos(long absPos)
public long getOriginalPos(long relPos)
public long getOriginalPos(long relPos, boolean afterChar)
public long getExtractedPosFlow(long absPos)
public long getOriginalPosFlow(long relPos)
public int getIndexByOriginalPosition(long absPos)
public int getIndexByOriginalPositionFlow(long absPos)
public void correctInformation(long originalPos, long origLen, long newLen)
m_currPos -= origLen - newLen;
originalPos
- Position of changed text in the original content.origLen
- Length of changed peace of text in the original content.newLen
- Length of new peace of text substiting the original peace.public void correctInformationOriginalMove(long originalPos, long moveLen)
Copyright © 2024 GATE. All rights reserved.