Home » Java » Miscellaneous » SortedList
- Visit:
- Hits:
- Views:
- Platform(s):
- Database(s):
- License:
- Price:
- Version:
- Script Added:
- Last Updated:
- Developer:
- Script Link:
- Tags:
- SortedList
- 155
- 1435
- N/A
- N/A
- Commercial License
- $39.99
- 1.0.0
- 22/08/2011
- 22/08/2011
- Ralph Chapin
- http://www.binpress.com/app/sortedlist/548
- binary tree code doubly java
Description:
Provides fast random and sequential access to vast sorted lists. Creates and maintains them with unmatched ease, speed and flexability. Simultaneously provides the benefits of a binary tree and a linked list.
You can find an entry with a keyed, binary-style search, then move sequentially in either direction (or both directions) from that point. You can do adds and removes at any point.
Finds entries rapidly by key. Can find the highest value less than a key or the lowest value greater than a key.
You can use multiple keys if they produce the same sort order. You can find a row by index number and then find a row by name with no need to resort the list or do other real work.
Given any entry, you can always get the next and previous entries. Removes and updates can be done freely with no need for an iterator or a keyed find.
Great for use with the rows in JTable's and JList's.
A SortedList entry can be part of another structure. It can be located through that structure and either removed directly from the SortedList or used to view the SortedList sequentially in either direction (or both directions).
Sequential searches are fast in both directions. Given attendance numbers at a theater, sorted by date, you can quickly determine the start and end of an attendence dip. (Find a date in the dip and scan in both directions for the first entries with normal attancance.)
Excellent for sparse array storage. If theater attendance numbers (above) are stored by 100's and attendance is steady, each entry can store a whole string of days with the same number (between 200 and 300, say). One sequential step can move ahead 50 days instead of just one. (This feature is apt to be more important for engineering and scientific applications.)
Works fine with small lists too. A million SortedLists with 10 entries each use no more memory than 10 SortedLists with a million entries each. So there are no awkward moments when a 10-entry list gets an unexpected 999,990 new rows, and no wasted memory when a million-entry list loses 999,990 rows.
All code is thoroughly Javadoc'ed.
- Other listings by this developer
Java » Miscellaneous
MovePath
Java » Development
Observer3D
Java » Development
DLList
Java » Development
SocketConnection
Java » Miscellaneous
DoubleClickDetector
Java » Miscellaneous
ConcreteSet
Java » Miscellaneous