//Ryan Goodfellow CS580 Final //this file pretty much follows the skeleton code. public class Range implements Itr { int low, high; IteratorHelper ih; public Range (int low, int high) { this.low = low; this.high = high; this.ih = new IteratorHelper(this); ih.start(); } public boolean hasNext() { return !this.ih.done(); } public int next() { return ih.get(); } public void run() { for (int i = low; i<=high; i++) { ih.yield(i); } } public synchronized Integer elementAt(Integer i) { return i; } public Integer max() { return this.high; } public Integer min() { return this.low; } }