Methods Summary |
---|
public synchronized boolean | contains(java.lang.Object o)Override methods that use .equals() comparisons on elements.
return indexOf(o) >= 0;
|
public static org.apache.tools.ant.util.IdentityStack | getInstance(java.util.Stack s)Get an IdentityStack containing the contents of the specified Stack.
if (s instanceof IdentityStack) {
return (IdentityStack) s;
}
IdentityStack result = new IdentityStack();
if (s != null) {
result.addAll(s);
}
return result;
|
public synchronized int | indexOf(java.lang.Object o, int pos)Override methods that use .equals() comparisons on elements.
for (int i = pos; i < size(); i++) {
if (get(i) == o) {
return i;
}
}
return -1;
|
public synchronized int | lastIndexOf(java.lang.Object o, int pos)Override methods that use .equals() comparisons on elements.
for (int i = pos; i >= 0; i--) {
if (get(i) == o) {
return i;
}
}
return -1;
|