de.danielbechler.diff.identity.EqualsIdentityStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-object-diff Show documentation
Show all versions of java-object-diff Show documentation
Framework to detect and handle differences between Java objects
The newest version!
package de.danielbechler.diff.identity;
import de.danielbechler.util.Objects;
/**
* Default implementation that uses Object.equals.
*/
public class EqualsIdentityStrategy implements IdentityStrategy
{
private static final EqualsIdentityStrategy instance = new EqualsIdentityStrategy();
public boolean equals(final Object working, final Object base)
{
return Objects.isEqual(working, base);
}
public static EqualsIdentityStrategy getInstance()
{
return instance;
}
}