edu.rice.cs.drjava.model.debug.jpda
Class JPDADebugger.RandomAccessStack

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<com.sun.jdi.ThreadReference>
                  extended by edu.rice.cs.drjava.model.debug.jpda.JPDADebugger.RandomAccessStack
All Implemented Interfaces:
Serializable, Cloneable, Iterable<com.sun.jdi.ThreadReference>, Collection<com.sun.jdi.ThreadReference>, List<com.sun.jdi.ThreadReference>, RandomAccess
Enclosing class:
JPDADebugger

private static class JPDADebugger.RandomAccessStack
extends Stack<com.sun.jdi.ThreadReference>

A thread-safe stack from which you can remove any element, not just the top of the stack. All synchronization is performed on the wrapped vector. TODO: make a generic Collection extending/replacing Stack.


Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
private JPDADebugger.RandomAccessStack()
           
 
Method Summary
 boolean contains(long id)
           
 boolean isEmpty()
           
 com.sun.jdi.ThreadReference peekAt(int i)
           
 com.sun.jdi.ThreadReference remove(long id)
           
 
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, 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

JPDADebugger.RandomAccessStack

private JPDADebugger.RandomAccessStack()
Method Detail

peekAt

public com.sun.jdi.ThreadReference peekAt(int i)

remove

public com.sun.jdi.ThreadReference remove(long id)
                                   throws NoSuchElementException
Throws:
NoSuchElementException

contains

public boolean contains(long id)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<com.sun.jdi.ThreadReference>
Specified by:
isEmpty in interface List<com.sun.jdi.ThreadReference>
Overrides:
isEmpty in class Vector<com.sun.jdi.ThreadReference>