All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bionic.js.BjsNativeObjectIdentifier Maven / Gradle / Ivy

There is a newer version: 0.3.0
Show newest version
package bionic.js;

import jjbridge.api.runtime.JSReference;

class BjsNativeObjectIdentifier
{
    private final JSReference jsReference;
    private final Class objectType;

    BjsNativeObjectIdentifier(JSReference jsReference, Class clazz)
    {
        this.jsReference = jsReference;
        this.objectType = clazz;
    }

    @Override
    public int hashCode()
    {
        return jsReference.hashCode() * 997 + objectType.hashCode();
    }

    @Override
    public boolean equals(Object o)
    {
        if (!(o instanceof BjsNativeObjectIdentifier))
        {
            return false;
        }

        BjsNativeObjectIdentifier that = (BjsNativeObjectIdentifier) o;
        return jsReference.equals(that.jsReference) && objectType.equals(that.objectType);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy