@Override
  public AdhocGroup clone() {
    AdhocGroup clone;
    try {
      clone = (AdhocGroup) super.clone();
    } catch (CloneNotSupportedException e) {
      throw new RuntimeException(e);
    }

    if (style != null) {
      clone.style = style.clone();
    }
    if (titleStyle != null) {
      clone.titleStyle = titleStyle.clone();
    }
    if (properties != null) {
      clone.properties = properties.clone();
    }

    return clone;
  }
  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null) return false;
    if (!(obj instanceof AdhocGroup)) return false;

    AdhocGroup object = (AdhocGroup) obj;
    if (!(name == null ? object.getName() == null : name.equals(object.getName()))) {
      return false;
    }
    if (!(startInNewPage == null
        ? object.getStartInNewPage() == null
        : startInNewPage.equals(object.getStartInNewPage()))) {
      return false;
    }
    if (!(headerLayout == null
        ? object.getHeaderLayout() == null
        : headerLayout.equals(object.getHeaderLayout()))) {
      return false;
    }
    if (!(style == null ? object.getStyle() == null : style.equals(object.getStyle()))) {
      return false;
    }
    if (!(titleStyle == null
        ? object.getTitleStyle() == null
        : titleStyle.equals(object.getTitleStyle()))) {
      return false;
    }
    if (!(properties == null
        ? object.getProperties() == null
        : properties.equals(object.getProperties()))) {
      return false;
    }

    return true;
  }