org.springframework.binding.value
Interface ValueChangeDetector

All Known Implementing Classes:
DefaultValueChangeDetector, EqualsValueChangeDetector

public interface ValueChangeDetector

Defines the operations for determining if two values (an old and a new value) are different enough to indicate a change in the value model. An implementation of this interface can be registered in the application context configuration. The configured instance is used in several classes to determine if two object values are sufficiently different to trigger further logic, like firing a value changed event, updating conversion values, etc.

Author:
Larry Streepy
See Also:
ApplicationServices, DefaultValueChangeDetector, org.springframework.binding.value.support.EquivalenceValueChangeDetector

Method Summary
 boolean hasValueChanged(Object oldValue, Object newValue)
          Determine if there has been a change between two values (an old and a new value).
 

Method Detail

hasValueChanged

boolean hasValueChanged(Object oldValue,
                        Object newValue)
Determine if there has been a change between two values (an old and a new value). The definition of different enough, is dependent upon the needs of a ValueModel implementation.

Parameters:
oldValue - Original object value
newValue - New object value
Returns:
true if the objects are different enough to indicate a change in the value model


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.