All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pw.prok.kdiff.Hunk Maven / Gradle / Ivy

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