Quick Index
Getting and Setting


Goal Achieved


Our goal has been achieved. Our growing and shifting algorithms logic work have produced one of our key goals:


Indexed Access


get(index)
Getting an element at an index position is trivial via delegation (to the child "elements").

Note: we affix "Priv" to "get" so make it obvious this is a private accessor. It will contain the excess capacity (nulls/blanks) so don't want to publicize it.
get(index) {
	return this.getPrivElements()[index];
}
set(index, newElem)
Setting an element into an index position is also trivial.
set(index, newElem) {
	this.getPrivElements()[index] = newElem;
}

Iteration


Just like "getting and setting", the algorithm for iteration is a non-algorithm because it is too simple (again this is good).

We would simply iterate over the fixed array in the standard ways: