public boolean equals(SnmpIndex index){
  if (size != index.getNbComponents())   return false;
  SnmpOid oid1;
  SnmpOid oid2;
  Vector<SnmpOid> components=index.getComponents();
  for (int i=0; i < size; i++) {
    oid1=oids.elementAt(i);
    oid2=components.elementAt(i);
    if (oid1.equals(oid2) == false)     return false;
  }
  return true;
}

public boolean equals ( SnmpIndex index ) { if ( size != index . getNbComponents ( ) ) return false ; SnmpOid oid1 ; SnmpOid oid2 ; Vector < SnmpOid > components = index . getComponents ( ) ; for ( int i = 0 ; i < size ; i ++ ) { oid1 = oids . elementAt ( i ) ; oid2 = components . elementAt ( i ) ; if ( oid1 . equals ( oid2 ) == false ) return false ; } return true ; }
compares two indexes for equality .
