org.apache.tools.ant.util
public class IdentityStack extends Stack
Since: Ant 1.7
Constructor Summary | |
---|---|
IdentityStack()
Default constructor. | |
IdentityStack(Object o)
Construct a new IdentityStack with the specified Object
as the bottom element. |
Method Summary | |
---|---|
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. |
Parameters: o the bottom element.
.equals()
comparisons on elements.Parameters: o the Object to search for.
Returns: true if the stack contains the object.
See Also: java.util.Vector#contains(Object)
Parameters: s the Stack to copy; ignored if null.
Returns: an IdentityStack instance.
.equals()
comparisons on elements.Parameters: o the Object to search for. pos the position from which to search.
Returns: the position of the object, -1 if not found.
See Also: java.util.Vector#indexOf(Object, int)
.equals()
comparisons on elements.Parameters: o the Object to search for. pos the position from which to search (backward).
Returns: the position of the object, -1 if not found.
See Also: java.util.Vector#indexOf(Object, int)