org.apache.tools.ant.util
Class IdentityStack
Stack
org.apache.tools.ant.util.IdentityStack
public class IdentityStack
extends Stack
Identity Stack.
IdentityStack() - Default constructor.
|
IdentityStack(Object o) - Construct a new IdentityStack with the specified Object
as the bottom element.
|
boolean | contains(Object o) - Override methods that use
.equals() comparisons on elements.
|
static IdentityStack | getInstance(Stack s) - Get an IdentityStack containing the contents of the specified Stack.
|
int | indexOf(Object o, int pos) - Override methods that use
.equals() comparisons on elements.
|
int | lastIndexOf(Object o, int pos) - Override methods that use
.equals() comparisons on elements.
|
IdentityStack
public IdentityStack()
Default constructor.
IdentityStack
public IdentityStack(Object o)
Construct a new IdentityStack with the specified Object
as the bottom element.
contains
public boolean contains(Object o)
Override methods that use .equals()
comparisons on elements.
o
- the Object to search for.
- true if the stack contains the object.
java.util.Vector.contains(Object)
getInstance
public static IdentityStack getInstance(Stack s)
Get an IdentityStack containing the contents of the specified Stack.
s
- the Stack to copy; ignored if null.
- an IdentityStack instance.
indexOf
public int indexOf(Object o,
int pos)
Override methods that use .equals()
comparisons on elements.
o
- the Object to search for.pos
- the position from which to search.
- the position of the object, -1 if not found.
java.util.Vector.indexOf(Object, int)
lastIndexOf
public int lastIndexOf(Object o,
int pos)
Override methods that use .equals()
comparisons on elements.
o
- the Object to search for.pos
- the position from which to search (backward).
- the position of the object, -1 if not found.
java.util.Vector.indexOf(Object, int)