Community
Participate
Working Groups
Support functions of arrays
I was just poking around in EglList while fixing Bug 356378. I corrected a few other mistakes. Haven't tested much yet. There's a TODO comment in the resize method and I don't know how to solve it.
The problem in resize is that we don't have a way to create new elements when the new size is larger than the current size. The solution is to pass in an object which we can use to create new elements. A Class object might work (call newInstance). The object will be null if the array's element type is nullable, since elements are initially null.
I changed ListTypeTemplate and EglList. The resize method and EglList constructor are now passed a Class object which is used to make new elements when necessary.
Closing.