Added equals() method to override java.lang.Object.equals(). This is

necessary because the '==' operator won't work with LC2.
This commit is contained in:
fur 1998-07-01 06:00:10 +00:00
Родитель d4699b0f80
Коммит c6cc90820d
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -128,4 +128,17 @@ public final class JSObject {
* JavaScript object.
*/
protected native void finalize();
/**
* Override java.lang.Object.equals() because identity is not preserved
* with instances of JSObject.
*/
public boolean equals(Object obj) {
JSObject jsobj;
if (!(obj instanceof JSObject))
return false;
jsobj = (JSObject)obj;
return (internal == jsobj.internal);
}
}