hasNext method
If the index is greater than the size, return false, otherwise return true.
Implementation
bool hasNext() => _index < _size;
If the index is greater than the size, return false, otherwise return true.
bool hasNext() => _index < _size;