public class DeltaAwareDirtyPredicate extends java.lang.Object implements IsDirtyPredicate
DeltaAwareDirtyPredicate
is an IsDirtyPredicate
strategy interface implementation that evaluates
the new value
as instance of Delta
and uses the Delta.hasDelta()
method
to determine if the new value
is dirty.Delta
,
IsDirtyPredicate
Modifier and Type | Field and Description |
---|---|
static DeltaAwareDirtyPredicate |
INSTANCE |
ALWAYS_DIRTY, NEVER_DIRTY
Constructor and Description |
---|
DeltaAwareDirtyPredicate() |
Modifier and Type | Method and Description |
---|---|
boolean |
isDirty(java.lang.Object oldValue,
java.lang.Object newValue)
Determines whether the
new value is dirty by evaluating the new value
as an instance of Delta and invoking its Delta.hasDelta() method. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen, orThen
public static final DeltaAwareDirtyPredicate INSTANCE
public boolean isDirty(@Nullable java.lang.Object oldValue, @Nullable java.lang.Object newValue)
new value
is dirty by evaluating the new value
as an instance of Delta
and invoking its Delta.hasDelta()
method.
The new value
is considered dirty immediately and automatically if the new value
is not an instance of Delta
.
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 evaluating
the new value
as an instance of Delta
and invoking its Delta.hasDelta()
method.
Returns true immediately if the new value
is not an instance of Delta
.Delta.hasDelta()
,
Delta