JML

java.util
Class LinkedList

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.AbstractSequentialList
              extended byjava.util.LinkedList
All Implemented Interfaces:
Cloneable, Collection, Deque, List, Queue, Serializable

public class LinkedList
extends AbstractSequentialList
implements List, Deque, Cloneable, Serializable


Nested Class Summary
(package private) static class LinkedList.1
           
private  class LinkedList.DescendingIterator
           
private static class LinkedList.Entry
           
private  class LinkedList.ListItr
           
 
Nested classes inherited from class java.util.AbstractList
 
Field Summary
private  LinkedList.Entry header
           
private static long serialVersionUID
           
private  int size
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
LinkedList()
           
LinkedList(Collection)
           
 
Method Summary
 void add(int, Object)
           
 boolean add(Object)
           
 boolean addAll(int, Collection)
           
 boolean addAll(Collection)
           
private  LinkedList.Entry addBefore(Object, LinkedList.Entry)
           
 void addFirst(Object)
           
 void addLast(Object)
           
 void clear()
           
 Object clone()
           
 boolean contains(Object)
           
 Iterator descendingIterator()
           
 Object element()
           
private  LinkedList.Entry entry(int)
           
 Object get(int)
           
 Object getFirst()
           
 Object getLast()
           
 int indexOf(Object)
           
 int lastIndexOf(Object)
           
 ListIterator listIterator(int)
           
 boolean offer(Object)
           
 boolean offerFirst(Object)
           
 boolean offerLast(Object)
           
 Object peek()
           
 Object peekFirst()
           
 Object peekLast()
           
 Object poll()
           
 Object pollFirst()
           
 Object pollLast()
           
 Object pop()
           
 void push(Object)
           
private  void readObject(ObjectInputStream)
           
 Object remove()
           
 Object remove(int)
           
 boolean remove(Object)
           
private  Object remove(LinkedList.Entry)
           
 Object removeFirst()
           
 boolean removeFirstOccurrence(Object)
           
 Object removeLast()
           
 boolean removeLastOccurrence(Object)
           
 Object set(int, Object)
           
 int size()
           
 Object[] toArray()
           
 Object[] toArray(Object[])
           
private  void writeObject(ObjectOutputStream)
           
 
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.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 
Methods inherited from interface java.util.Deque
iterator
 

Field Detail

size

private transient int size

serialVersionUID

private static final long serialVersionUID

header

private transient LinkedList.Entry header
Constructor Detail

LinkedList

public LinkedList()

LinkedList

public LinkedList(Collection)
Method Detail

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

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.