Package org.jsoup.helper
Class DescendableLinkedList<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.AbstractSequentialList<E>
-
- java.util.LinkedList<E>
-
- org.jsoup.helper.DescendableLinkedList<E>
-
- Type Parameters:
E
- Type of elements
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<E>
,Collection<E>
,Deque<E>
,List<E>
,Queue<E>
public class DescendableLinkedList<E> extends LinkedList<E>
Provides a descending iterator and other 1.6 methods to allow support on the 1.5 JRE.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description DescendableLinkedList()
Create a new DescendableLinkedList.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<E>
descendingIterator()
Get an iterator that starts and the end of the list and works towards the start.E
peekLast()
Look at the last element, if there is one.E
pollLast()
Remove and return the last element, if there is onevoid
push(E e)
Add a new element to the start of the list.-
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, poll, pollFirst, pop, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, spliterator, toArray, toArray
-
Methods inherited from class java.util.AbstractSequentialList
iterator
-
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
-
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subList
-
-
-
-
Method Detail
-
push
public void push(E e)
Add a new element to the start of the list.
-
peekLast
public E peekLast()
Look at the last element, if there is one.
-
pollLast
public E pollLast()
Remove and return the last element, if there is one
-
descendingIterator
public Iterator<E> descendingIterator()
Get an iterator that starts and the end of the list and works towards the start.- Specified by:
descendingIterator
in interfaceDeque<E>
- Overrides:
descendingIterator
in classLinkedList<E>
- Returns:
- an iterator that starts and the end of the list and works towards the start.
-
-