added print() method

This commit is contained in:
Ben Fry
2014-01-21 18:26:28 -05:00
parent 2c02301f9a
commit fd57fac8b6

View File

@@ -771,6 +771,13 @@ public class IntList implements Iterable<Integer> {
}
public void print() {
for (int i = 0; i < size(); i++) {
System.out.format("[%d] %d%n", i, data[i]);
}
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();