Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

TypedLinkedList.java

00001 package edu.ksu.cis.bandera.specification.predicate.node;
00002 
00003 /* This file was generated by SableCC (http://www.sable.mcgill.ca/sablecc/). */
00004 
00005 import java.util.*;
00006 
00007 public class TypedLinkedList extends LinkedList
00008 {
00009     Cast cast;
00010 
00011     private class TypedLinkedListIterator implements ListIterator
00012     {
00013         ListIterator iterator;
00014 
00015         TypedLinkedListIterator(ListIterator iterator)
00016         {
00017             this.iterator = iterator;
00018         }
00019 
00020         public boolean hasNext()
00021         {
00022             return iterator.hasNext();
00023         }
00024 
00025         public Object next()
00026         {
00027             return iterator.next();
00028         }
00029 
00030         public boolean hasPrevious()
00031         {
00032             return iterator.hasPrevious();
00033         }
00034 
00035         public Object previous()
00036         {
00037             return iterator.previous();
00038         }
00039 
00040         public int nextIndex()
00041         {
00042             return iterator.nextIndex();
00043         }
00044 
00045         public int previousIndex()
00046         {
00047             return iterator.previousIndex();
00048         }
00049 
00050         public void remove()
00051         {
00052             iterator.remove();
00053         }
00054 
00055         public void set(Object o)
00056         {
00057             iterator.set(cast.cast(o));
00058         }
00059 
00060         public void add(Object o)
00061         {
00062             iterator.add(cast.cast(o));
00063         }
00064     }
00065     public TypedLinkedList()
00066     {
00067         super();
00068 
00069         cast = NoCast.instance;
00070     }
00071     public TypedLinkedList(Cast cast)
00072     {
00073         super();
00074 
00075         this.cast = cast;
00076     }
00077     public TypedLinkedList(Collection c)
00078     {
00079         super(c);
00080 
00081         cast = NoCast.instance;
00082     }
00083     public TypedLinkedList(Collection c, Cast cast)
00084     {
00085         super(c);
00086 
00087         this.cast = cast;
00088     }
00089     public void add(int index, Object element)
00090     {
00091         super.add(index, cast.cast(element));
00092     }
00093     public boolean add(Object o)
00094     {
00095         return super.add(cast.cast(o));
00096     }
00097     public boolean addAll(int index, Collection c)
00098     {
00099         int pos = index;
00100         for(Iterator i = c.iterator(); i.hasNext(); )
00101         {
00102             super.add(pos++, cast.cast(i.next()));
00103         }
00104         return true;
00105     }
00106     public boolean addAll(Collection c)
00107     {
00108         for(Iterator i = c.iterator(); i.hasNext(); )
00109         {
00110             super.add(cast.cast(i.next()));
00111         }
00112         return true;
00113     }
00114     public void addFirst(Object o)
00115     {
00116         super.addFirst(cast.cast(o));
00117     }
00118     public void addLast(Object o)
00119     {
00120         super.addLast(cast.cast(o));
00121     }
00122     public Cast getCast()
00123     {
00124         return cast;
00125     }
00126     public ListIterator listIterator(int index)
00127     {
00128         return new TypedLinkedListIterator(super.listIterator(index));
00129     }
00130 }

Generated at Thu Feb 7 06:58:44 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001