org.exolab.castor.util
Class SafeStack
Stack
org.exolab.castor.util.SafeStack
public class SafeStack
extends Stack
The Stack.search
method of Stack
can throw a
ClassCastException if the items on the stack are not all the same type. We
override that method so it compares on identity and not using
equals()
.
$Revision: 0000 $ $Date: $ int | search(Object object) -
Searches for the given Object in the stack and returns its position
relative to the top of the Stack (ie the number of calls to #pop()
before the object is returned by #pop())
|
search
public int search(Object object)
Searches for the given Object in the stack and returns its position
relative to the top of the Stack (ie the number of calls to #pop()
before the object is returned by #pop())
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com