org.springframework.binding.value.support
Class EqualsValueChangeDetector
java.lang.Object
org.springframework.binding.value.support.EqualsValueChangeDetector
- All Implemented Interfaces:
- ValueChangeDetector
public class EqualsValueChangeDetector
- extends Object
- implements ValueChangeDetector
An implementation of ValueChangeDetector that provides the same semantics as
ObjectUtils.nullSafeEquals(java.lang.Object, java.lang.Object).
If the objects are not the same object, they are compared using the equals method of
the first object. Nulls are handled safely.
- Author:
- Larry Streepy
|
Method Summary |
boolean |
hasValueChanged(Object oldValue,
Object newValue)
Determines if there has been a change in value between the provided arguments. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EqualsValueChangeDetector
public EqualsValueChangeDetector()
hasValueChanged
public boolean hasValueChanged(Object oldValue,
Object newValue)
- Determines if there has been a change in value between the provided arguments. The
objects are compared using the
equals method.
- Specified by:
hasValueChanged in interface ValueChangeDetector
- Parameters:
oldValue - Original object valuenewValue - New object value
- Returns:
- true if the objects are different enough to indicate a change in the value
model
Copyright © 2004-2009 The Spring Framework. All Rights Reserved.