Using this implementation allows you to get java.util.LinkedList behavior (a doubly linked list, with Iterators that support insert and delete operations) without incurring the overhead of creating Node wrapper objects for every element in your list.
The requirement to achieve this time/space gain is that the Objects stored in the List implement the TLinkable interface.
The limitations are that you cannot put the same object into more than one list or more than once in the same list. You must also ensure that you only remove objects that are actually in the list. That is, if you have an object A and lists l1 and l2, you must ensure that you invoke List.remove(A) on the correct list. It is also forbidden to invoke List.remove() with an unaffiliated TLinkable (one that belongs to no list): this will destroy the list you invoke it on.
Created: Sat Nov 10 15:25:10 2001
@author Eric D. Friedman @version $Id: TLinkedList.java,v 1.15 2009/03/31 19:43:14 robeden Exp $ @see gnu.trove.TLinkable
|
|
|
|