Method new()
Iterator
constructor
Usage
Iterator$new(x, .subset = .subset2)
Arguments
x
object to iterate over
.subset
accessor function
Returns
invisibly returns the Iterator
object
Method begin()
set iterator to the first element of the underlying
sequence unless length of sequence is zero, in which case it will
point to nothing.
Returns
invisibly returns the Iterator
object
Method get_value()
get value where the iterator points to
Usage
Iterator$get_value()
Returns
returns the value the Iterator
is pointing at.
Method get_next()
get next value
Usage
Iterator$get_next()
Returns
increments the iterator and returns the value the Iterator
is pointing to.
Method has_next()
check if iterator
has more elements
Usage
Iterator$has_next()
Returns
TRUE
if iterator
has next element else FALSE
Method has_value()
check if iterator
points at value
Usage
Iterator$has_value()
Returns
TRUE
if iterator
points at value otherwise FALSE
Returns
number of elements to iterate
Method pos()
get iterator position
Returns
integer
if iterator
has next element else FALSE
Method next_iter()
increment iterator
Usage
Iterator$next_iter()
Returns
invisibly returns the Iterator
object
Method reset_iter()
reset iterator to '0'
Usage
Iterator$reset_iter()
Returns
invisibly returns the Iterator
object
Method clone()
The objects of this class are cloneable with this method.
Usage
Iterator$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.