java.util
Class LinkedList
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.AbstractSequentialList
java.util.LinkedList
- All Implemented Interfaces:
- Cloneable, Collection, Deque, List, Queue, Serializable
- public class LinkedList
- extends AbstractSequentialList
- implements List, Deque, Cloneable, Serializable
size
private transient int size
serialVersionUID
private static final long serialVersionUID
header
private transient LinkedList.Entry header
LinkedList
public LinkedList()
LinkedList
public LinkedList(Collection)
getFirst
public Object getFirst()
- Specified by:
getFirst in interface Deque
getLast
public Object getLast()
- Specified by:
getLast in interface Deque
removeFirst
public Object removeFirst()
- Specified by:
removeFirst in interface Deque
removeLast
public Object removeLast()
- Specified by:
removeLast in interface Deque
addFirst
public void addFirst(Object)
- Specified by:
addFirst in interface Deque
addLast
public void addLast(Object)
- Specified by:
addLast in interface Deque
contains
public boolean contains(Object)
- Specified by:
contains in interface List- Overrides:
contains in class AbstractCollection
size
public int size()
- Specified by:
size in interface List
add
public boolean add(Object)
- Specified by:
add in interface List- Overrides:
add in class AbstractList
remove
public boolean remove(Object)
- Specified by:
remove in interface List- Overrides:
remove in class AbstractCollection
addAll
public boolean addAll(Collection)
- Specified by:
addAll in interface List- Overrides:
addAll in class AbstractCollection
addAll
public boolean addAll(int,
Collection)
- Specified by:
addAll in interface List- Overrides:
addAll in class AbstractSequentialList
clear
public void clear()
- Specified by:
clear in interface List- Overrides:
clear in class AbstractList
get
public Object get(int)
- Specified by:
get in interface List- Overrides:
get in class AbstractSequentialList
set
public Object set(int,
Object)
- Specified by:
set in interface List- Overrides:
set in class AbstractSequentialList
add
public void add(int,
Object)
- Specified by:
add in interface List- Overrides:
add in class AbstractSequentialList
remove
public Object remove(int)
- Specified by:
remove in interface List- Overrides:
remove in class AbstractSequentialList
entry
private LinkedList.Entry entry(int)
indexOf
public int indexOf(Object)
- Specified by:
indexOf in interface List- Overrides:
indexOf in class AbstractList
lastIndexOf
public int lastIndexOf(Object)
- Specified by:
lastIndexOf in interface List- Overrides:
lastIndexOf in class AbstractList
peek
public Object peek()
- Specified by:
peek in interface Deque
element
public Object element()
- Specified by:
element in interface Deque
poll
public Object poll()
- Specified by:
poll in interface Deque
remove
public Object remove()
- Specified by:
remove in interface Deque
offer
public boolean offer(Object)
- Specified by:
offer in interface Deque
offerFirst
public boolean offerFirst(Object)
- Specified by:
offerFirst in interface Deque
offerLast
public boolean offerLast(Object)
- Specified by:
offerLast in interface Deque
peekFirst
public Object peekFirst()
- Specified by:
peekFirst in interface Deque
peekLast
public Object peekLast()
- Specified by:
peekLast in interface Deque
pollFirst
public Object pollFirst()
- Specified by:
pollFirst in interface Deque
pollLast
public Object pollLast()
- Specified by:
pollLast in interface Deque
push
public void push(Object)
- Specified by:
push in interface Deque
pop
public Object pop()
- Specified by:
pop in interface Deque
removeFirstOccurrence
public boolean removeFirstOccurrence(Object)
- Specified by:
removeFirstOccurrence in interface Deque
removeLastOccurrence
public boolean removeLastOccurrence(Object)
- Specified by:
removeLastOccurrence in interface Deque
listIterator
public ListIterator listIterator(int)
- Specified by:
listIterator in interface List- Specified by:
listIterator in class AbstractSequentialList
addBefore
private LinkedList.Entry addBefore(Object,
LinkedList.Entry)
remove
private Object remove(LinkedList.Entry)
descendingIterator
public Iterator descendingIterator()
- Specified by:
descendingIterator in interface Deque
clone
public Object clone()
- Overrides:
clone in class Object
toArray
public Object[] toArray()
- Specified by:
toArray in interface List- Overrides:
toArray in class AbstractCollection
toArray
public Object[] toArray(Object[])
- Specified by:
toArray in interface List- Overrides:
toArray in class AbstractCollection
writeObject
private void writeObject(ObjectOutputStream)
throws IOException
- Throws:
IOException
readObject
private void readObject(ObjectInputStream)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.