SortedArrayList Screenshot



SortedArrayList

This is a pair of library classes to include in your owncode for manipulating ArrayLists. It consist of two classes: SortedArrayList and Merge. SortedArrayList is an ArrayList that remembers how it issorted, so that if you ask it to sort, it can sometimesbypass the work when it is already in order. You declare theorder you want and it keeps the list sorted, You just callsort whenever you need the list to be in perfect order. Itmay or may not actually sort the list at that time. Itautomatically avoids physically sorting when it does notreally have to. Merge lets you merge/prune two SortedArrayLists in any of 32different ways, e.g. union, intersection, update... It alsolets you dedup and prune individual SortedArrayLists. They are used extensively as part the replicatorsenderpackage. Having an look at that code may give you a morerealistic view of what they can do. To use them, have a look at the source code and the sampledrivers. They don't do anything useful standalone. You mustincorporate them into your own code. Why the spectrum icon? It represent the colours of lightsorted in order by wavelength.


Back to SortedArrayList Details page

New software of Web Authoring, JavaScript