UC Berkeley Group for User Interface Research
Updated November 17, 2000

edu.berkeley.guir.lib.collection
Class NonlockingStack

java.lang.Object
  |
  +--edu.berkeley.guir.lib.collection.NonlockingStack

public class NonlockingStack
extends Object

A nonlocking version of a stack (list-based). This is not thread safe in any manner.

This software is distributed under the Berkeley Software License.

 Revisions:  - GUIRLib-v1.0-1.0.0, May 09 1999, JH
               Created class
             - GUIRLib-v1.2-1.0.0, Jun 22 2000, JH
               Touched for GUIRLib release
             - GUIRLib-v1.3-1.0.0, Aug 11 2000, JH
               Touched for GUIRLib release
             - GUIRLib-v1.4-1.0.0, Aug 31 2000, JH
               Touched for GUIRLib release
 

Since:
JDK 1.2.1
Version:
GUIRLib-v1.4-1.0.0, Aug 31 2000
Author:
(jasonh@cs.berkeley.edu)

Constructor Summary
NonlockingStack()
           
 
Method Summary
 void clear()
           
 void copy(NonlockingStack s)
          Copy the passed-in stack into the current stack.
 boolean empty()
           
 boolean isEmpty()
           
 Object peek()
           
 Object pop()
           
 Object push(Object obj)
           
 int search(Object obj)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonlockingStack

public NonlockingStack()
Method Detail

copy

public void copy(NonlockingStack s)
Copy the passed-in stack into the current stack. That is, copy s into this.

peek

public final Object peek()

pop

public final Object pop()

empty

public final boolean empty()

push

public final Object push(Object obj)

search

public final int search(Object obj)

size

public final int size()

clear

public final void clear()

isEmpty

public final boolean isEmpty()

Copyright Information