Range.java
1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Decompiled with CFR 0_118.
*/
package com.day.util.diff;
import com.day.util.diff.Document;
public class Range {
static final String CVS_ID = "$URL$ $Rev$ $Date$";
public final Document doc;
public final int low;
public final int high;
static final /* synthetic */ boolean $assertionsDisabled;
public Range(Document doc, int low, int high) {
if (!$assertionsDisabled && low < 0) {
throw new AssertionError();
}
if (!$assertionsDisabled && high < low) {
throw new AssertionError();
}
this.doc = doc;
this.low = low;
this.high = high;
}
public int len() {
return this.high - this.low;
}
public String toString() {
return "" + this.low + "-" + this.high;
}
public String toRangeString() {
if (this.len() == 1) {
return String.valueOf(this.low + 1);
}
return "" + (this.low + 1) + "," + this.len();
}
static {
Class class_ = Range.class;
$assertionsDisabled = !class_.desiredAssertionStatus();
}
}