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

org.rx.core.IdentityWrapper Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package org.rx.core;

import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class IdentityWrapper {
    public final T instance;

    public boolean equals(Object other) {
        return other instanceof IdentityWrapper && ((IdentityWrapper) other).instance == this.instance;
    }

    public int hashCode() {
        return System.identityHashCode(this.instance);
    }

    @Override
    public String toString() {
        return String.valueOf(instance);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy