org.exolab.castor.util

Class 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().
Version:
$Revision: 0000 $ $Date: $
Author:
Edward Kuns

Method Summary

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())

Method Details

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