class Region
extends java.lang.Object
Regions are held in a singly-linked-list by Candidate
using the
Candidate.regionList
field. The list is kept in sorted order by
resultStart
.
Modifier and Type | Field and Description |
---|---|
(package private) int |
length
Length of the region, always >= 1.
|
(package private) Region |
next
Next entry in the region linked list.
|
(package private) int |
resultStart
First position of this region in the result file blame is computing.
|
(package private) int |
sourceStart
First position in the
Candidate that owns this Region. |
Constructor and Description |
---|
Region(int rs,
int ss,
int len) |
Modifier and Type | Method and Description |
---|---|
(package private) Region |
copy(int newSource)
Copy the entire result region, but at a new source position.
|
(package private) Region |
deepCopy() |
(package private) void |
slideAndShrink(int d)
Edit this region to remove the first
d elements. |
(package private) Region |
splitFirst(int newSource,
int newLen)
Split the region, assigning a new source position to the first half.
|
java.lang.String |
toString() |
Region next
int resultStart
int sourceStart
Candidate
that owns this Region.int length
Region copy(int newSource)
newSource
- the new source position.Region splitFirst(int newSource, int newLen)
newSource
- the new source position.newLen
- length of the new region.void slideAndShrink(int d)
d
elements.d
- number of elements to remove from the start of this region.Region deepCopy()
public java.lang.String toString()
toString
in class java.lang.Object