Class LLinkedList<O>

java.lang.Object
de.linusdev.lutils.llist.LLinkedList<O>
Type Parameters:
O - element class
All Implemented Interfaces:
Iterable<O>, Collection<O>, List<O>

public class LLinkedList<O> extends Object implements List<O>
A thread safe linked list implementation. It can only be traversed in a single direction. Tt can not be traversed in reverse. That is because every node only stores the next element, but not the previous element.

This list allows modification during iteration. Whether the modification applies during the iteration depends solely on the order, in which the iteration and modification events happen.

For more complex operations, which must be thread safe, this list also provides a doSynchronized method, which executes the given Function synchronized on this list's lock. Which means, no modifying operations can be started by other threads, while the lock is being hold. Reading operations are still possible by all threads.