package jetbrains.mps.vcs.diff.ui.common;
/*Generated by MPS */
import jetbrains.mps.baseLanguage.tuples.runtime.MultiTuple;
public class Bounds extends MultiTuple._2<Integer, Integer> {
public Bounds() {
super();
}
public Bounds(Integer start, Integer end) {
super(start, end);
}
public Integer start(Integer value) {
return super._0(value);
}
public Integer end(Integer value) {
return super._1(value);
}
public Integer start() {
return super._0();
}
public Integer end() {
return super._1();
}
public int length() {
return (int) this.end() - (int) this.start();
}
public Bounds merge(Bounds that) {
return new Bounds(Math.min((int) this.start(), (int) that.start()), Math.max((int) this.end(), (int) that.end()));
}
public boolean contains(int value) {
return (int) this.start() <= value && value < (int) this.end();
}
}