<div dir="ltr"><div>Can you open bit more why using collection is out of the question?</div><div><br></div><div>Jussi<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 8, 2020 at 7:16 AM Bruce <<a href="mailto:adamnt42@gmail.com">adamnt42@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Firstly, I haven't tried this but I was wondering if it is possible.<br>
<br>
Given a set of objects that have an ordinal characteristic (not a <br>
property of the object itself and not encountered in the ascending order <br>
of that characteristic) is it possible to construct an array of such <br>
objects that is only sparsely populated?<br>
<br>
Let's say we have the following objects, with that derived <br>
characteristic in brackets: Ahab(3),Chab(6), Fhab(2) and Ghab(7).<br>
I want to fill the array such that its' final representation is<br>
[0] -<br>
[1] -<br>
[2] Fhab<br>
[3] Ahab<br>
[4] -<br>
[5] -<br>
[6] Chab<br>
[7] Ghab<br>
<br>
I don't know at the outset what the maximum ordinal value is and so I <br>
don't know the size of the array.<br>
There are reasons for using an array rather than a collection keyed by <br>
the value.<br>
The source of the objects is unsortable, they arrive over time in a <br>
random order.<br>
<br>
Any thoughts?<br>
b<br>
<br>
p.s. It's like the IP layer in TCP/IP putting the packets back in order <br>
to rebuild the entire message.<br>
<br>
----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" rel="noreferrer" target="_blank">http://gambaswiki.org/wiki/doc/netiquette</a> ]----<br>
</blockquote></div>