Qore Programming Language Reference Manual  0.8.9
 All Classes Namespaces Functions Variables Groups Pages
QC_RangeIterator.dox.h
1 namespace Qore {
4 
30 
31 public:
33 
44  constructor(int start, int stop, int step = 1);
45 
46 public:
48 
53  copy();
54 
55 public:
57 
72 any getValue();
73 
74 public:
76 
89 bool next();
90 
91 public:
93 
118  reset();
119 
120 public:
122 
133 bool valid();
134 };
135 };
136 
138 namespace Qore {
157 
159 
186 RangeIterator xrange(int start, int stop, int step = 1);
187 
189 
210 RangeIterator xrange(int stop);
211 
213 };
reset()
Reset the iterator instance to its initial state (start, stop, and step).
copy()
Creates a copy of the RangeIterator object, iterating the same object as the original and in the same...
bool next()
This method returns True while there are more numbers to iterate and False when the range has been co...
This class defines a range-like iterator to be used to iterate numerical sequences.
Definition: QC_RangeIterator.dox.h:29
bool valid()
returns True if the iterator is currently pointing at a valid element, False if not ...
RangeIterator xrange(int start, int stop, int step=1)
Returns a RangeIterator containing an arithmetic progression of integers.
constructor(int start, int stop, int step=1)
creates the numerical sequence iterator with the initial arguments
any getValue()
returns the current value or throws an INVALID-ITERATOR exception if the iterator is invalid ...
This class defines an abstract interface for iterators.
Definition: QC_AbstractIterator.dox.h:10