SortedArrayList and Merge

Sort and Merge ArrayLists efficiently.

This is a pair of library classes to include in your own code for manipulating ArrayLists. It consist of two classes: SortedArrayList and Merge. SortedArrayList is an ArrayList that remembers how it is sorted, so that if you ask it to sort, it can sometimes bypass the work when it is already in order. You declare the order you want and it keeps the list sorted, You just call sort whenever you need the list to be in perfect order. It may or may not actually sort the list at that time. It automatically avoids physically sorting when it does not really have to. Merge lets you merge/prune two SortedArrayLists in any of 32 different ways, e.g. union, intersection, update... It also lets you dedup and prune individual SortedArrayLists. They are used extensively as part the replicatorsender package. Having an look at that code may give you a more realistic view of what they can do. To use them, have a look at the source code and the sample drivers. They don't do anything useful standalone. You must incorporate them into your own code. Why the spectrum icon? It represent the colours of light sorted in order by wavelength.

Changes: correct for JDK 1.8.0-20 redirecting Collections.sort to List.sort

Minimum requirements: Java 1.7+

Operating system: Win2000,WinXP,Win7 x32,Win7 x64,Windows 8,WinServer,WinVista,WinVista x64,Unix,Linux,Mac OS X,Java

Program URL: http://mindprod.com/products2.html#SORTED

SortedArrayList and Merge screenshot

...

Special permissions

You may include Sorted CD compilation. You may not sell Sorted. It is free.

EULA

This program is for non-military use only. For details on what that licencing restriction means and why I restricted this software that way, see http://mindprod.com/contact/nonmil.html If you incorporate any of my code in your programs, they too must be marked for non-military use only. However it is not your responsibility to enforce that restriction.

Read more