org.rx.core.IdentityWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxlib Show documentation
Show all versions of rxlib Show documentation
A set of utilities for Java
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);
}
}