org.onemind.commons.java.datastructure
Class ThreadLocalStack

java.lang.Object
  extended byorg.onemind.commons.java.datastructure.ThreadLocalStack

public class ThreadLocalStack
extends java.lang.Object

A stack associated with current thread

Version:
$Id: ThreadLocalStack.java,v 1.2 2004/08/26 12:33:16 thlee Exp $ $Name: $
Author:
TiongHiang Lee (thlee@onemindsoft.org)

Constructor Summary
ThreadLocalStack()
           
 
Method Summary
 java.lang.Object getLocal()
          Get the top-most local object in local stack
 Stack getLocalStack()
          get the local stack
 java.lang.Object popLocal()
          Pop the top-most local object in threadlocal stack
 void popLocalUtil(int i)
          Pop uptil certain size in local stack
 int pushLocal(java.lang.Object localObject)
          Push a local object the the thread local stack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadLocalStack

public ThreadLocalStack()
Method Detail

pushLocal

public int pushLocal(java.lang.Object localObject)
Push a local object the the thread local stack

Parameters:
localObject - the local object
Returns:
the size after the push

getLocalStack

public Stack getLocalStack()
get the local stack

Returns:
the stack

getLocal

public java.lang.Object getLocal()
Get the top-most local object in local stack

Returns:
the top-most local object in local stack

popLocalUtil

public void popLocalUtil(int i)
Pop uptil certain size in local stack

Parameters:
i - the size

popLocal

public java.lang.Object popLocal()
Pop the top-most local object in threadlocal stack

Returns:
the top-most local object


Copyright © 2004-2006 . All Rights Reserved.