public class IdentityStack
extends java.util.Stack
Constructor and Description |
---|
IdentityStack()
Default constructor.
|
IdentityStack(java.lang.Object o)
Construct a new IdentityStack with the specified Object
as the bottom element.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.Object o)
Override methods that use
.equals() comparisons on elements. |
static IdentityStack |
getInstance(java.util.Stack s)
Get an IdentityStack containing the contents of the specified Stack.
|
int |
indexOf(java.lang.Object o,
int pos)
Override methods that use
.equals() comparisons on elements. |
int |
lastIndexOf(java.lang.Object o,
int pos)
Override methods that use
.equals() comparisons on elements. |
add, add, addAll, addAll, addElement, capacity, clear, clone, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
public IdentityStack()
public IdentityStack(java.lang.Object o)
o
- the bottom element.public static IdentityStack getInstance(java.util.Stack s)
s
- the Stack to copy; ignored if null.public boolean contains(java.lang.Object o)
.equals()
comparisons on elements.contains
in interface java.util.Collection
contains
in interface java.util.List
contains
in class java.util.Vector
o
- the Object to search for.Vector.contains(Object)
public int indexOf(java.lang.Object o, int pos)
.equals()
comparisons on elements.indexOf
in class java.util.Vector
o
- the Object to search for.pos
- the position from which to search.Vector.indexOf(Object, int)
public int lastIndexOf(java.lang.Object o, int pos)
.equals()
comparisons on elements.lastIndexOf
in class java.util.Vector
o
- the Object to search for.pos
- the position from which to search (backward).Vector.indexOf(Object, int)