Class IntrusiveLinkedList<T extends LinkedListEntry<T,T>>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- net.automatalib.common.smartcollection.AbstractSmartCollection<E>
-
- net.automatalib.common.smartcollection.AbstractLinkedList<T,T>
-
- net.automatalib.common.smartcollection.IntrusiveLinkedList<T>
-
- Type Parameters:
T
- element class, must implementLinkedListEntry
.
- All Implemented Interfaces:
Iterable<T>
,Collection<T>
,SmartCollection<T>
,SmartSequence<T>
public class IntrusiveLinkedList<T extends LinkedListEntry<T,T>> extends AbstractLinkedList<T,T>
An intrusive version of a linked list. When using this linked list implementation, the elements themselve have to store the reference to their successors and predecessors, i.e., must implement theLinkedListEntry
interface.Note that this furthermore implies that each such element can only be stored in at most one
IntrusiveLinkedList
.
-
-
Constructor Summary
Constructors Constructor Description IntrusiveLinkedList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected T
makeEntry(T element)
Creates (if necessary) aLinkedListEntry
for the given element.-
Methods inherited from class net.automatalib.common.smartcollection.AbstractLinkedList
castRef, choose, chooseRef, clear, concat, get, getBack, getBackEntry, getBackReference, getFront, getFrontEntry, getFrontReference, insertAfter, insertAfterEntry, insertBefore, insertBeforeEntry, isEmpty, iterator, popBack, popBackEntry, popFront, popFrontEntry, pred, pushBack, pushBackEntry, pushFront, pushFrontEntry, referencedAdd, referenceIterator, remove, removeEntry, replace, replaceEntry, size, succ, swap
-
Methods inherited from class net.automatalib.common.smartcollection.AbstractSmartCollection
add, addAll, addAll, deepClear, find, quickClear, references, remove
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
add, addAll, contains, containsAll, equals, hashCode, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray
-
Methods inherited from interface net.automatalib.common.smartcollection.SmartCollection
addAll, addAll, deepClear, find, quickClear, references, remove
-
-
-
-
Method Detail
-
makeEntry
protected T makeEntry(T element)
Description copied from class:AbstractLinkedList
Creates (if necessary) aLinkedListEntry
for the given element. For intrusive linked lists, e.g., the argument itself is returned.- Specified by:
makeEntry
in classAbstractLinkedList<T extends LinkedListEntry<T,T>,T extends LinkedListEntry<T,T>>
- Parameters:
element
- the element for which to retrieve an entry.- Returns:
- the entry for the given element.
-
-