Java Kernel Implementation CR: Implement equals on DvParagraph

The current implementation of DvParagraph (rev. 27)
does not implement "equals(Object): boolean" method.
Because all DataValue's are implemented as immutable
transfer object, the absence of the method causes
problems with frameworks that manipulate beans (for
instance Hibernate, JAXB etc).

A sample implementation could be:

public boolean equals(Object object) {
  if (this == object) {
    return true;
  }
  if ((null == object) ||
      !(object instanceof DvParagraph)) {
    return false;
  }
  final DvParagraph other = (DvParagraph) object;
  if ((null != items)?
        !items.equals(other.items) :
        (null != other.items)) {
     return false;
  }
  return true;
}

equals() has been implemented in DvParagraph now.

Cheers,
Rong

babisr@yahoo.com wrote: