@Override public synchronized boolean equals(Object object){
  if (this == object) {
    return true;
  }
  if (object instanceof List) {
    List<?> list=(List<?>)object;
    if (list.size() != elementCount) {
      return false;
    }
    int index=0;
    Iterator<?> it=list.iterator();
    while (it.hasNext()) {
      Object e1=elementData[index++], e2=it.next();
      if (!(e1 == null ? e2 == null : e1.equals(e2))) {
        return false;
      }
    }
    return true;
  }
  return false;
}

@ Override public synchronized boolean equals ( Object object ) { if ( this == object ) { return true ; } if ( object instanceof List ) { List < ? > list = ( List < ? > ) object ; if ( list . size ( ) != elementCount ) { return false ; } int index = 0 ; Iterator < ? > it = list . iterator ( ) ; while ( it . hasNext ( ) ) { Object e1 = elementData [ index ++ ] , e2 = it . next ( ) ; if ( ! ( e1 == null ? e2 == null : e1 . equals ( e2 ) ) ) { return false ; } } return true ; } return false ; }
compares the specified object to this vector and returns if they are equal . the object must be a list which contains the same objects in the same order .
