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, List, Serializable

public class LinkedList
extends AbstractSequentialList
implements List, Cloneable, Serializable


Nested Class Summary
private static class LinkedList.Entry
           
private  class LinkedList.ListItr
           
 
Nested classes inherited from class java.util.AbstractList
AbstractList.1
 
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)
           
private  LinkedList.Entry entry(int)
           
 Object get(int)
           
 Object getFirst()
           
 Object getLast()
           
 int indexOf(Object)
           
 int lastIndexOf(Object)
           
 ListIterator listIterator(int)
           
private  void readObject(ObjectInputStream)
           
 Object remove(int)
           
 boolean remove(Object)
           
private  void remove(LinkedList.Entry)
           
 Object removeFirst()
           
 Object removeLast()
           
 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
 

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

size

public int size()
Specified by:
size in interface List

clear

public void clear()
Specified by:
clear in interface List
Overrides:
clear in class AbstractList

readObject

private void readObject(ObjectInputStream)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException

writeObject

private void writeObject(ObjectOutputStream)
                  throws IOException
Throws:
IOException

clone

public Object clone()
Overrides:
clone in class Object

getFirst

public Object getFirst()

getLast

public Object getLast()

removeFirst

public Object removeFirst()

removeLast

public Object removeLast()

toArray

public Object[] toArray()
Specified by:
toArray in interface List
Overrides:
toArray in class AbstractCollection

get

public Object get(int)
Specified by:
get in interface List
Overrides:
get in class AbstractSequentialList

remove

public Object remove(int)
Specified by:
remove in interface List
Overrides:
remove in class AbstractSequentialList

add

public void add(int,
                Object)
Specified by:
add in interface List
Overrides:
add in class AbstractSequentialList

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

addFirst

public void addFirst(Object)

addLast

public void addLast(Object)

add

public boolean add(Object)
Specified by:
add in interface List
Overrides:
add in class AbstractList

contains

public boolean contains(Object)
Specified by:
contains in interface List
Overrides:
contains in class AbstractCollection

remove

public boolean remove(Object)
Specified by:
remove in interface List
Overrides:
remove in class AbstractCollection

addAll

public boolean addAll(int,
                      Collection)
Specified by:
addAll in interface List
Overrides:
addAll in class AbstractSequentialList

addAll

public boolean addAll(Collection)
Specified by:
addAll in interface List
Overrides:
addAll in class AbstractCollection

entry

private LinkedList.Entry entry(int)

remove

private void remove(LinkedList.Entry)

listIterator

public ListIterator listIterator(int)
Specified by:
listIterator in interface List
Specified by:
listIterator in class AbstractSequentialList

set

public Object set(int,
                  Object)
Specified by:
set in interface List
Overrides:
set in class AbstractSequentialList

toArray

public Object[] toArray(Object[])
Specified by:
toArray in interface List
Overrides:
toArray in class AbstractCollection

addBefore

private LinkedList.Entry addBefore(Object,
                                   LinkedList.Entry)

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.