Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


oracle.javatools.parser.util
Class SimpleStack

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList
              extended by oracle.javatools.parser.util.SimpleStack

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class SimpleStack
extends java.util.ArrayList

SimpleStack is an unsynchronized stack container based off of ArrayList. This is useful since java.util.Stack is based off of Vector and thus carries the performance cost of synchronization.

See Also:
Serialized Form

Field Summary

 

Fields inherited from class java.util.AbstractList
modCount

 

Constructor Summary
SimpleStack()
          Constructs an empty list.
SimpleStack(java.util.Collection c)
          Constructs a stack containing the elements of the specified collection, pushed in the order they are returned by the collection's iterator.
SimpleStack(int initialCapacity)
          Constructs an empty stack with the specified initial capacity.

 

Method Summary
 java.lang.Object peek()
          Retrieves the object at the top of the stack without removing it.
 java.lang.Object pop()
          Pops the object off the top of the stack.
 void push(java.lang.Object o)
          Pushes the object onto the top of the stack by appending it to the end of this list.

 

Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize

 

Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList

 

Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString

 

Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList

 

Constructor Detail

SimpleStack

public SimpleStack()
Constructs an empty list.

SimpleStack

public SimpleStack(java.util.Collection c)
Constructs a stack containing the elements of the specified collection, pushed in the order they are returned by the collection's iterator.

SimpleStack

public SimpleStack(int initialCapacity)
Constructs an empty stack with the specified initial capacity.

Method Detail

pop

public java.lang.Object pop()
Pops the object off the top of the stack.
Returns:
the Object popped from the stack

push

public void push(java.lang.Object o)
Pushes the object onto the top of the stack by appending it to the end of this list.
Parameters:
o - the Object to be pushed.

peek

public java.lang.Object peek()
Retrieves the object at the top of the stack without removing it.
Returns:
Object at the top of the stack.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


Copyright © 1997, 2011, Oracle. All rights reserved.