code: protected boolean compareValues(Object previous, Object value) {
          boolean result = true;
  
          if (previous == null) {
              result = (value != null);
          } else if (value == null) {
              result = true;
          } else {
  	    boolean previousEqualsValue = previous.equals(value);
  	    if (!previousEqualsValue && 
  		previous instanceof Comparable &&
  		value instanceof Comparable) {
                  try {
                      result = !(0 == ((Comparable) previous).
                                        compareTo((Comparable) value));
                  } catch (ClassCastException cce) {
                      // Comparable throws CCE if the types prevent a comparison
                      result = true;
                  }
  	    } else {
  		result = !previousEqualsValue;
  	    }
          }
          return result;
      }
docs: <p>Return <code>true</code> if the new value is different from
  the previous value.  First compare the two values by passing
  <em>value</em> to the <code>equals</code> method on argument
  <em>previous</em>.  If that method returns <code>true</code>,
  return <code>true</code>.  If that method returns
  <code>false</code>, and both arguments implement
  <code>java.lang.Comparable</code>, compare the two values by
  passing <em>value</em> to the <code>compareTo</code> method on
  argument <em>previous</em>.  Return <code>true</code> if this
  method returns <code>0</code>, <code>false</code> otherwise.</p>
  
  @param previous old value of this component (if any)
  @param value    new value of this component (if any)