item = item.next;
item = item.previous; ++idx;
    public int search(Object object) {        int idx = 0;        StackItem item = top;        while (item != null) {            if (item.object == object) return idx;            item = item.next;        }        return -1;    } //-- indexOf