public synchronized boolean removeElement(Object object){
  int index;
  if ((index=indexOf(object,0)) == -1) {
    return false;
  }
  removeElementAt(index);
  return true;
}

public synchronized boolean removeElement ( Object object ) { int index ; if ( ( index = indexOf ( object , 0 ) ) == - 1 ) { return false ; } removeElementAt ( index ) ; return true ; }
removes the first occurrence , starting at the beginning and moving towards the end , of the specified object from this vector . all elements with an index bigger than the element that gets removed have their index decreased by 1 .
