faa.tg.list
Class TgList<E>

java.lang.Object
  extended by faa.tg.list.TgList<E>
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>
Direct Known Subclasses:
AirportList, FrequencyList, RouteList, RouteNodeList, RouteSegmentList, RunwayList

public abstract class TgList<E>
extends java.lang.Object
implements java.io.Serializable, java.util.List<E>

 THIS ONLY EXISTS FOR LEGACY CODE: DO NOT USE IT FOR NEW CLASSES.
  
Need this class for backward compatibility: allows the import of old recordings. This class can be deleted when recordings made before 2008/06/05 are no longer needed.

Version:
$Id: TgList.java,v 3.6 2008/08/25 20:30:57 lykensj Exp $
Author:
Tim Kimmet
See Also:
Serialized Form

Field Summary
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
(package private) static long serialVersionUID
           
protected  java.util.Vector<E> theList
           
 
Constructor Summary
protected TgList()
          Deprecated.  
 
Method Summary
 boolean add(E e)
           
 void add(int index, E element)
           
 boolean addAll(java.util.Collection<? extends E> c)
           
 boolean addAll(int index, java.util.Collection<? extends E> c)
           
 void clear()
           
 boolean contains(java.lang.Object elem)
          Tests if the specified object is a component in this List.
 boolean containsAll(java.util.Collection<?> c)
           
 E get(int index)
           
 int indexOf(java.lang.Object elem)
          Searches for the first occurence of the given argument, testing for equality using the equals method.
 boolean isEmpty()
          Tests if this List has no components.
 java.util.Iterator<E> iterator()
          Returns an iterator over the elements in this list.
 int lastIndexOf(java.lang.Object elem)
          Returns the index of the last occurrence of the specified object in this List.
 java.util.ListIterator<E> listIterator()
           
 java.util.ListIterator<E> listIterator(int index)
           
protected  java.util.List<E> readResolve()
           
 E remove(int index)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> c)
           
 boolean retainAll(java.util.Collection<?> c)
           
 E set(int index, E element)
           
 int size()
          Returns the number of components in this List.
 java.util.List<E> subList(int fromIndex, int toIndex)
           
 java.lang.Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 java.lang.String toString()
          Returns a string representation of this List.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

CVS_VERSION_ID

public static final java.lang.String CVS_VERSION_ID
The CVS Version ID

See Also:
Constant Field Values

theList

protected final java.util.Vector<E> theList
Constructor Detail

TgList

protected TgList()
Deprecated. 

THIS ONLY EXISTS FOR LEGACY CODE: DO NOT USE IT FOR NEW CLASSES.

Method Detail

iterator

public final java.util.Iterator<E> iterator()
Returns an iterator over the elements in this list.

Specified by:
iterator in interface java.lang.Iterable<E>
Specified by:
iterator in interface java.util.Collection<E>
Specified by:
iterator in interface java.util.List<E>

size

public final int size()
Returns the number of components in this List.

Specified by:
size in interface java.util.Collection<E>
Specified by:
size in interface java.util.List<E>
Returns:
the number of components in this List.

isEmpty

public final boolean isEmpty()
Tests if this List has no components.

Specified by:
isEmpty in interface java.util.Collection<E>
Specified by:
isEmpty in interface java.util.List<E>
Returns:
true if this List has no components; false otherwise.

toString

public final java.lang.String toString()
Returns a string representation of this List.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this List.

contains

public final boolean contains(java.lang.Object elem)
Tests if the specified object is a component in this List.

Specified by:
contains in interface java.util.Collection<E>
Specified by:
contains in interface java.util.List<E>
Parameters:
elem - an object.
Returns:
true if the specified object is a component in this List; false otherwise.

indexOf

public final int indexOf(java.lang.Object elem)
Searches for the first occurence of the given argument, testing for equality using the equals method.

Specified by:
indexOf in interface java.util.List<E>
Parameters:
elem - an object.
Returns:
the index of the first occurrence of the argument in this List; returns -1 if the object is not found.
See Also:
Object.equals(java.lang.Object)

lastIndexOf

public final int lastIndexOf(java.lang.Object elem)
Returns the index of the last occurrence of the specified object in this List.

Specified by:
lastIndexOf in interface java.util.List<E>
Parameters:
elem - the desired component.
Returns:
the index of the last occurrence of the specified object in this List; returns -1 if the object is not found.

add

public final boolean add(E e)
Specified by:
add in interface java.util.Collection<E>
Specified by:
add in interface java.util.List<E>

add

public final void add(int index,
                      E element)
Specified by:
add in interface java.util.List<E>

addAll

public final boolean addAll(java.util.Collection<? extends E> c)
Specified by:
addAll in interface java.util.Collection<E>
Specified by:
addAll in interface java.util.List<E>

addAll

public final boolean addAll(int index,
                            java.util.Collection<? extends E> c)
Specified by:
addAll in interface java.util.List<E>

clear

public final void clear()
Specified by:
clear in interface java.util.Collection<E>
Specified by:
clear in interface java.util.List<E>

containsAll

public final boolean containsAll(java.util.Collection<?> c)
Specified by:
containsAll in interface java.util.Collection<E>
Specified by:
containsAll in interface java.util.List<E>

get

public final E get(int index)
Specified by:
get in interface java.util.List<E>

listIterator

public final java.util.ListIterator<E> listIterator()
Specified by:
listIterator in interface java.util.List<E>

listIterator

public final java.util.ListIterator<E> listIterator(int index)
Specified by:
listIterator in interface java.util.List<E>

remove

public final boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<E>
Specified by:
remove in interface java.util.List<E>

remove

public final E remove(int index)
Specified by:
remove in interface java.util.List<E>

removeAll

public final boolean removeAll(java.util.Collection<?> c)
Specified by:
removeAll in interface java.util.Collection<E>
Specified by:
removeAll in interface java.util.List<E>

retainAll

public final boolean retainAll(java.util.Collection<?> c)
Specified by:
retainAll in interface java.util.Collection<E>
Specified by:
retainAll in interface java.util.List<E>

set

public final E set(int index,
                   E element)
Specified by:
set in interface java.util.List<E>

subList

public final java.util.List<E> subList(int fromIndex,
                                       int toIndex)
Specified by:
subList in interface java.util.List<E>

toArray

public final java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<E>
Specified by:
toArray in interface java.util.List<E>

toArray

public final <T> T[] toArray(T[] a)
Specified by:
toArray in interface java.util.Collection<E>
Specified by:
toArray in interface java.util.List<E>

readResolve

protected java.util.List<E> readResolve()
                                 throws java.io.ObjectStreamException
Throws:
java.io.ObjectStreamException