net.sf.bddbddb.order
Class StackQueue

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<E>
              extended by java.util.Stack
                  extended by net.sf.bddbddb.order.StackQueue
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess, Queue

public class StackQueue
extends java.util.Stack
implements Queue

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
StackQueue()
           
 
Method Summary
 java.lang.Object element()
          Retrieves, but does not remove, the head of this queue.
 boolean offer(java.lang.Object arg0)
          Inserts the specified element into this queue, if possible.
 java.lang.Object poll()
          Retrieves and removes the head of this queue, or null if this queue is empty.
 java.lang.Object remove()
          Retrieves and removes the head of this queue.
 
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 net.sf.bddbddb.order.Queue
peek
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

StackQueue

public StackQueue()
Method Detail

offer

public boolean offer(java.lang.Object arg0)
Description copied from interface: Queue
Inserts the specified element into this queue, if possible. When using queues that may impose insertion restrictions (for example capacity bounds), method offer is generally preferable to method Collection.add(E), which can fail to insert an element only by throwing an exception.

Specified by:
offer in interface Queue
Parameters:
arg0 - the element to insert.
Returns:
true if it was possible to add the element to this queue, else false

poll

public java.lang.Object poll()
Description copied from interface: Queue
Retrieves and removes the head of this queue, or null if this queue is empty.

Specified by:
poll in interface Queue
Returns:
the head of this queue, or null if this queue is empty.

remove

public java.lang.Object remove()
Description copied from interface: Queue
Retrieves and removes the head of this queue. This method differs from the poll method in that it throws an exception if this queue is empty.

Specified by:
remove in interface Queue
Returns:
the head of this queue.

element

public java.lang.Object element()
Description copied from interface: Queue
Retrieves, but does not remove, the head of this queue. This method differs from the peek method only in that it throws an exception if this queue is empty.

Specified by:
element in interface Queue
Returns:
the head of this queue.


Copyright © 2004-2008 Stanford SUIF Compiler Group. All Rights Reserved.