/** * Counts the # of elements from the current cursor position to the end. */privateint count() {
int n = 0;
while (pos < len) {
read();
read();
n++;
}
return n;
}
/** * Counts the # of elements from the current cursor position to the end. */privateint count() {
int n = 0;
while (pos < len) {
read();
read();
n++;
}
return n;
}
/** * Reads the {@link LineRange} object the cursor is pointing at. */public LineRange next() {
int s = read();
int d = read();
returnnew LineRange(s, s + d);
}
/** * Reads the {@link LineRange} object the cursor is pointing at. */public LineRange next() {
int s = read();
int d = read();
returnnew LineRange(s, s + d);
}
/** * Reads the current value at the cursor and compares it. */publicboolean compare(final LineRange lr) {
int s = read();
int d = read();
return lr.getStart() == s && lr.getEnd() == s + d;
}
/** * Reads the current value at the cursor and compares it. */publicboolean compare(final LineRange lr) {
int s = read();
int d = read();
return lr.getStart() == s && lr.getEnd() == s + d;
}