public class EqualsDirtyPredicate extends java.lang.Object implements IsDirtyPredicate
EqualsDirtyPredicate
is an IsDirtyPredicate
strategy interface implementation that determines
whether the new value
is dirty by comparing the new value
with the old value
using the Object.equals(Object)
method.IsDirtyPredicate
Modifier and Type | Field and Description |
---|---|
static EqualsDirtyPredicate |
INSTANCE |
ALWAYS_DIRTY, NEVER_DIRTY
Constructor and Description |
---|
EqualsDirtyPredicate() |
Modifier and Type | Method and Description |
---|---|
boolean |
isDirty(java.lang.Object oldValue,
java.lang.Object newValue)
Determines whether the
new value is dirty by comparing the new value
with the old value using the Object.equals(Object) method. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen, orThen
public static final EqualsDirtyPredicate INSTANCE
public boolean isDirty(@Nullable java.lang.Object oldValue, @Nullable java.lang.Object newValue)
new value
is dirty by comparing the new value
with the old value
using the Object.equals(Object)
method.
This method is null-safe.isDirty
in interface IsDirtyPredicate
oldValue
- Object
referring to the previous value.newValue
- Object
referring to the new value.new value
is dirty by comparing
the new value
with the old value
using the Object.equals(Object)
method.Object.equals(Object)