Class LinkedList<T>
java.lang.Object
java.util.AbstractCollection<T>
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 AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractList
add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface 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>
-