/** * Returns where an object is on this stack. * * @param o the desired object. * @return the distance from the top of the stack where the object is] * located; the return value <code>-1</code> indicates that the * object is not on the stack. * @since JDK1.0 */ public int search(Object o) { int i = lastIndexOf(o); if (i >= 0) { return size() - i; } return -1; }
/** * Returns where an object is on this stack. * * @param o the desired object. * @return the distance from the top of the stack where the object is] * located; the return value <code>-1</code> indicates that the * object is not on the stack. * @since JDK1.0 */ public int search(Object o) { int i = lastIndexOf(o); if (i >= 0) { return size() - i; } return -1; }
/** * Returns where an object is on this stack. * * @param o the desired object. * @return the distance from the top of the stack where the object is] * located; the return value <code>-1</code> indicates that the * object is not on the stack. * @since JDK1.0 */ public int search(Object o) { int i = lastIndexOf(o); if (i >= 0) { return size() - i; } return -1; }
/** * Returns where an object is on this stack. * * @param o the desired object. * @return the distance from the top of the stack where the object is] * located; the return value <code>-1</code> indicates that the * object is not on the stack. * @since JDK1.0 */ public int search(Object o) { int i = lastIndexOf(o); if (i >= 0) { return size() - i; } return -1; }
/** * Returns where an object is on this stack. * * @param o the desired object. * @return the distance from the top of the stack where the object is] * located; the return value <code>-1</code> indicates that the * object is not on the stack. * @since JDK1.0 */ public int search(Object o) { int i = lastIndexOf(o); if (i >= 0) { return size() - i; } return -1; }
/** * Returns where an object is on this stack. * * @param o the desired object. * @return the distance from the top of the stack where the object is] * located; the return value <code>-1</code> indicates that the * object is not on the stack. * @since JDK1.0 */ public int search(Object o) { int i = lastIndexOf(o); if (i >= 0) { return size() - i; } return -1; }
/** * Returns where an object is on this stack. * * @param o the desired object. * @return the distance from the top of the stack where the object is] * located; the return value <code>-1</code> indicates that the * object is not on the stack. * @since JDK1.0 */ public int search(Object o) { int i = lastIndexOf(o); if (i >= 0) { return size() - i; } return -1; }
/** * Returns where an object is on this stack. * * @param o the desired object. * @return the distance from the top of the stack where the object is] * located; the return value <code>-1</code> indicates that the * object is not on the stack. * @since JDK1.0 */ public int search(Object o) { int i = lastIndexOf(o); if (i >= 0) { return size() - i; } return -1; }
/** * Returns where an object is on this stack. * * @param o the desired object. * @return the distance from the top of the stack where the object is] * located; the return value <code>-1</code> indicates that the * object is not on the stack. * @since JDK1.0 */ public int search(Object o) { int i = lastIndexOf(o); if (i >= 0) { return size() - i; } return -1; }