public interface HasChangeHashSupport
The solution to this problem is by using events to handle the change of the hashCode, unregister the old object while it still contains the old hashCode and inser it back again then the new hashcode can be calculated
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property.
|
void |
firePropertyChangeEvent(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Convenient method to fire a property change event.
|
boolean |
isChangeHashEnabled()
During the class construction, there are several calls
to resetHash that shall not generate an event.
|
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property.
|
boolean isChangeHashEnabled()
void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
or listener
is null, no
exception is thrown and no action is taken.propertyName
- The name of the property to listen on.listener
- The PropertyChangeListener to be addedvoid removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
listener
was added more than once to the same event
source for the specified property, it will be notified one less time
after being removed.
If propertyName
is null, no exception is thrown and no
action is taken.
If listener
is null, or was never added for the specified
property, no exception is thrown and no action is taken.propertyName
- The name of the property that was listened on.listener
- The PropertyChangeListener to be removedvoid firePropertyChangeEvent(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
propertyName
- the event name to fireoldValue
- the old property valuenewValue
- the new property valueCopyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa