mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
14 lines
416 B
Java
14 lines
416 B
Java
import java.util.*;
|
|
|
|
class IteratePositiveCheck {
|
|
public List<String> myLines = new ArrayList<>();
|
|
|
|
private int getDistanceBack(final int idxStart, final List<String> lines) {
|
|
if (idxStart < 0) return lines.size();
|
|
int cnt = lines.size() - 1;
|
|
for (int i = idxStart; i >= 0 && cnt >= 0; i--, cnt--) {
|
|
if (! myLines.get(i).equals(lines.get(cnt))) return (cnt + 1);
|
|
}
|
|
return cnt + 1;
|
|
}
|
|
} |