fixed iterator remove() methods so they dont skip container elements

This commit is contained in:
inkwellsiesta
2016-06-01 16:00:44 -04:00
committed by Leslie Watkins
parent 3aefae4470
commit 2bb3582195
6 changed files with 10 additions and 1 deletions
+2
View File
@@ -158,6 +158,7 @@ public class FloatDict {
public void remove() {
removeIndex(index);
index--;
}
public String next() {
@@ -218,6 +219,7 @@ public class FloatDict {
public void remove() {
removeIndex(index);
index--;
}
public Float next() {
+1
View File
@@ -793,6 +793,7 @@ public class FloatList implements Iterable<Float> {
public void remove() {
FloatList.this.remove(index);
index--;
}
public Float next() {
+2
View File
@@ -159,6 +159,7 @@ public class IntDict {
public void remove() {
removeIndex(index);
index--;
}
public String next() {
@@ -219,6 +220,7 @@ public class IntDict {
public void remove() {
removeIndex(index);
index--;
}
public Integer next() {
+1
View File
@@ -737,6 +737,7 @@ public class IntList implements Iterable<Integer> {
public void remove() {
IntList.this.remove(index);
index--;
}
public Integer next() {
+2
View File
@@ -160,6 +160,7 @@ public class StringDict {
public void remove() {
removeIndex(index);
index--;
}
public String next() {
@@ -219,6 +220,7 @@ public class StringDict {
public void remove() {
removeIndex(index);
index--;
}
public String next() {
+2 -1
View File
@@ -657,6 +657,7 @@ public class StringList implements Iterable<String> {
public void remove() {
StringList.this.remove(index);
index--;
}
public String next() {
@@ -768,4 +769,4 @@ public class StringList implements Iterable<String> {
sb.append(" ]");
return sb.toString();
}
}
}