//given "length" (i.e., the # of buckets to construct) //A DynamicArray may be substituded for LinkedList let newBuckets = DynamicArray.newEmpty(); for (let i = 0; i < length; i++) newBuckets.add(LinkedList.newEmpty()); //Set ivar this.buckets = newBuckets;
Given: DynamicList<DynamicList<Association<K, V>>> table; <DynamicList<Association<K, V>>> //The generic param for the outer DynamicList is also a DynamicList <Association<K, V>> //The generic param for the inner DynamicList is an Association <K, V> //The generic params for Association are K and V