Class DefaultLinkedList<E>
java.lang.Object
java.util.AbstractCollection<E>
net.automatalib.common.smartcollection.AbstractSmartCollection<E>
net.automatalib.common.smartcollection.AbstractLinkedList<E,DefaultLinkedListEntry<E>>
net.automatalib.common.smartcollection.DefaultLinkedList<E>
- Type Parameters:
E- element class.
- All Implemented Interfaces:
Iterable<E>,Collection<E>,SmartCollection<E>,SmartSequence<E>
A simple linked list implementation that allows storing arbitrary elements.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DefaultLinkedListEntry<E>Creates (if necessary) aLinkedListEntryfor the given element.voidreplace(ElementReference ref, E newElement) Replaces the element referenced by the given reference with the specified 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, replaceEntry, size, succ, swapMethods inherited from class net.automatalib.common.smartcollection.AbstractSmartCollection
add, addAll, addAll, deepClear, find, quickClear, references, removeMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
add, addAll, contains, containsAll, equals, hashCode, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArrayMethods inherited from interface net.automatalib.common.smartcollection.SmartCollection
addAll, addAll, deepClear, find, quickClear, references, remove
-
Constructor Details
-
DefaultLinkedList
public DefaultLinkedList()
-
-
Method Details
-
replace
Description copied from interface:SmartCollectionReplaces the element referenced by the given reference with the specified element.- Specified by:
replacein interfaceSmartCollection<E>- Overrides:
replacein classAbstractLinkedList<E,DefaultLinkedListEntry<E>> - Parameters:
ref- the reference of the element to be replaced.newElement- the replacement.
-
makeEntry
Description copied from class:AbstractLinkedListCreates (if necessary) aLinkedListEntryfor the given element. For intrusive linked lists, e.g., the argument itself is returned.- Specified by:
makeEntryin classAbstractLinkedList<E,DefaultLinkedListEntry<E>> - Parameters:
element- the element for which to retrieve an entry.- Returns:
- the entry for the given element.
-