@Override
 public int hashCode() {
   int result;
   long temp;
   result = (horizontalAlignment != null ? horizontalAlignment.hashCode() : 0);
   result = 31 * result + (verticalAlignment != null ? verticalAlignment.hashCode() : 0);
   temp = horizontalDistance != +0.0d ? Double.doubleToLongBits(horizontalDistance) : 0L;
   result = 31 * result + (int) (temp ^ (temp >>> 32));
   temp = verticalDistance != +0.0d ? Double.doubleToLongBits(verticalDistance) : 0L;
   result = 31 * result + (int) (temp ^ (temp >>> 32));
   result = 31 * result + (borderRectangleKind != null ? borderRectangleKind.hashCode() : 0);
   return result;
 }
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    RectangleAlignment that = (RectangleAlignment) o;

    if (Double.compare(that.horizontalDistance, horizontalDistance) != 0) return false;
    if (Double.compare(that.verticalDistance, verticalDistance) != 0) return false;
    if (borderRectangleKind != null
        ? !borderRectangleKind.equals(that.borderRectangleKind)
        : that.borderRectangleKind != null) return false;
    if (horizontalAlignment != null
        ? !horizontalAlignment.equals(that.horizontalAlignment)
        : that.horizontalAlignment != null) return false;
    if (verticalAlignment != null
        ? !verticalAlignment.equals(that.verticalAlignment)
        : that.verticalAlignment != null) return false;

    return true;
  }