public boolean equals(Object object){
  if (!(object instanceof ObjectInstance)) {
    return false;
  }
  ObjectInstance val=(ObjectInstance)object;
  if (!name.equals(val.getObjectName()))   return false;
  if (className == null)   return (val.getClassName() == null);
  return className.equals(val.getClassName());
}

public boolean equals ( Object object ) { if ( ! ( object instanceof ObjectInstance ) ) { return false ; } ObjectInstance val = ( ObjectInstance ) object ; if ( ! name . equals ( val . getObjectName ( ) ) ) return false ; if ( className == null ) return ( val . getClassName ( ) == null ) ; return className . equals ( val . getClassName ( ) ) ; }
compares the current object instance with another object instance .
