org.edg.data.util
Class LoadableStack

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--java.util.Stack
                          |
                          +--org.edg.data.util.LoadableStack
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public final class LoadableStack
extends java.util.Stack

Maintains a simple fifo stack of strings, which are loaded from a File, or URI. Currently it just extends Stack.

Version:
$Id: LoadableStack.java,v 1.1 2003/09/03 12:38:42 jamesc Exp $
Author:
Gavin McCance
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
protected LoadableStack()
          never used
  LoadableStack(java.io.File file)
          Load in a list of Strings into the stack, from the given file.
  LoadableStack(java.net.URI uri)
          create a new loadable stack, reading in the strings from a URI
 
Methods inherited from class java.util.Stack
empty, peek, pop, push, search
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

LoadableStack

protected LoadableStack()
never used


LoadableStack

public LoadableStack(java.net.URI uri)
              throws java.io.FileNotFoundException
create a new loadable stack, reading in the strings from a URI

Parameters:
uri - the URI
Throws:
java.io.FileNotFoundException - if there is no file at the URI

LoadableStack

public LoadableStack(java.io.File file)
              throws java.io.FileNotFoundException
Load in a list of Strings into the stack, from the given file.

Parameters:
file - the file to read from
Throws:
java.io.FileNotFoundException - if there is no file at the given location