get method
- int index
Retrieves the element at the specified 0-based index in O(1) time.
Implementation
T get(int index) {
if (index < 0 || index >= length) {
throw RangeError.index(index, this);
}
return (start + index * step) as T;
}
Retrieves the element at the specified 0-based index in O(1) time.
T get(int index) {
if (index < 0 || index >= length) {
throw RangeError.index(index, this);
}
return (start + index * step) as T;
}