2
* The contects of this file is in the Public Domain.
4
* Created by Gustav Hartivgsson.
8
public class RangeIterator {
10
private int32 current;
11
public RangeIterator (Range range) {
13
this.current = this.range.start;
20
if (!this.range.reverse) {
21
if (this.current <= this.range.end) {
26
if (this.current >= this.range.end){
33
public bool has_next () {
34
return (this.current < this.range.end);
39
public bool reverse {get; private set;}
40
public int32 start {get; private set;}
41
public int32 end {get; private set;}
43
public Range (int32 start, int32 end) {
53
public Type element_type () {
57
public RangeIterator iterator () {
58
return new RangeIterator (this);