
pw.prok.kdiff.Hunk Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kDiff Show documentation
Show all versions of kDiff Show documentation
Library for generating and applying diff/patch files
The newest version!
package pw.prok.kdiff;
import pw.prok.kdiff.delta.Delta;
/**
* Represents hunk of delta
*
* @param element type
*/
public class Hunk {
private final Delta delta;
private final int offset;
public Hunk(Delta delta, int offset) {
this.delta = delta;
this.offset = offset;
}
public Delta getDelta() {
return delta;
}
public int getOriginalPosition() {
return delta.getOriginal().getPosition();
}
public int getOffset() {
return offset;
}
public int getRevisedPosition() {
return delta.getOriginal().getPosition() + offset;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy