We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd59f3b commit 5570a4eCopy full SHA for 5570a4e
1 file changed
src/main/java/org/archive/util/iterator/StartBoundedStringIterator.java
@@ -40,11 +40,17 @@ public String getNextInner() {
40
}
41
while(inner.hasNext()) {
42
String tmp = inner.next();
43
+
44
+ boolean cond;
45
int cmp = boundary.compareTo(tmp);
- if ((flip * cmp) > 0) {
-// System.out.format("Skipping: %s\n", tmp);
46
47
+ if (flip > 0) {
48
+ cond = (cmp <= 0);
49
+ } else {
50
+ cond = ((cmp >= 0) || tmp.startsWith(boundary));
51
- if ((boundary.compareTo(tmp) * flip) <= 0) {
52
53
+ if (cond) {
54
started = true;
55
return tmp;
56
0 commit comments