Class LinkedList<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
org.aksw.commons.collections.lists.LinkedList<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LinkedListNode<T>protected LinkedListNode<T>protected intFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
first
-
last
-
size
protected int size
-
-
Constructor Details
-
LinkedList
public LinkedList()
-
-
Method Details
-
append
-
add
- Specified by:
addin interfaceCollection<T>- Specified by:
addin interfaceList<T>- Overrides:
addin classAbstractList<T>
-
get
-
iterator
-
size
public int size()TODO: Ideally the complexity of the size function should be O(1) instead O(n) But this would mean, that certain functions (link / unlink) that are currently part of LinkedListNode would have to go here instead.- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceList<T>- Specified by:
sizein classAbstractCollection<T>
-