code: protected boolean compareValues(Object previous, Object value) {
  
          if ((previous == null) && (value != null)) {
              return (true);
          } else if ((previous != null) && (value == null)) {
              return (true);
          } else if ((previous == null)) {
              return (false);
          }
  
          boolean valueChanged = false;
          Object oldarray[];
          Object newarray[];
  
          // The arrays may be arrays of primitives;  for simplicity,
          // perform the boxing here.
          if (!(previous instanceof Object[])) {
              previous = toObjectArray(previous);
          }
  
          if (!(value instanceof Object[])) {
              value = toObjectArray(value);
          }
  
          // If values are still not of the type Object[], it is perhaps a
          // mistake by the renderers, so return false, so that
          // ValueChangedEvent is not queued in this case.
          if (!(previous instanceof Object[]) || 
                !(value instanceof Object[])) {
                return false;
          }
          oldarray = (Object[]) previous;
          newarray = (Object[])value;
         
          // If we got here then both the arrays cannot be null
          // if their lengths vary, return false.
          if ( oldarray.length != newarray.length) {
              return true;
          }
          
          // make sure every element in the previous array occurs the same
          // number of times in the current array. This should help us
          // to find out the values changed are not. Since we cannot assume
          // the browser will send the elements in the same order everytime,
          // it will not suffice to just compare the element position and position.
          int count1;
          int count2;
          for ( int i= 0; i < oldarray.length; ++i ) {
              count1 = countElementOccurrence(oldarray[i], oldarray);
              count2 = countElementOccurrence(oldarray[i], newarray);
              if ( count1 != count2 ) {
                  valueChanged = true;
                  break;
              }     
          }    
          return valueChanged;
  
      }
docs: <p>Return <code>true</code> if the new value is different from the
  previous value. Value comparison must not be sensitive to element order.
  </p>
  
  @param previous old value of this component
  @param value new value of this component