package com.perforce.bumble;
public class DiffModel {
private String type;
private int orig;
private int revd;
private String line;
public DiffModel(String type, String line) {
this.type = type;
this.line = line;
}
public String getOrig() {
return Integer.toString(orig);
}
public String getRevd() {
return Integer.toString(revd);
}
public void setOrig(int orig) {
this.orig = orig;
}
public void setRevd(int revd) {
this.revd = revd;
}
public String getType() {
if (type == null) {
return "original";
}
return type.toLowerCase();
}
public void setType(String type) {
this.type = type;
}
public String getLine() {
return line;
}
public void setLine(String line) {
this.line = line;
}
public String getMarker() {
if (type == null) {
return " ";
}
switch (type) {
case "INSERT":
return "+";
case "DELETE":
return "-";
default:
return " ";
}
}
}