Example #1
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + blockIndent;
   result = prime * result + ((breakBefore == null) ? 0 : breakBefore.hashCode());
   result = prime * result + ((keep == null) ? 0 : keep.hashCode());
   result = prime * result + keepWithNext;
   result = prime * result + keepWithNextSheets;
   result = prime * result + keepWithPreviousSheets;
   result = prime * result + ((listType == null) ? 0 : listType.hashCode());
   result = prime * result + ((margin == null) ? 0 : margin.hashCode());
   result = prime * result + orphans;
   result = prime * result + ((padding == null) ? 0 : padding.hashCode());
   result = prime * result + ((textBlockProps == null) ? 0 : textBlockProps.hashCode());
   result = prime * result + ((textBorderStyle == null) ? 0 : textBorderStyle.hashCode());
   result = prime * result + ((verticalPosition == null) ? 0 : verticalPosition.hashCode());
   result = prime * result + widows;
   return result;
 }
Example #2
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) {
     return true;
   }
   if (obj == null) {
     return false;
   }
   if (getClass() != obj.getClass()) {
     return false;
   }
   BlockProperties other = (BlockProperties) obj;
   if (blockIndent != other.blockIndent) {
     return false;
   }
   if (breakBefore != other.breakBefore) {
     return false;
   }
   if (keep != other.keep) {
     return false;
   }
   if (keepWithNext != other.keepWithNext) {
     return false;
   }
   if (keepWithNextSheets != other.keepWithNextSheets) {
     return false;
   }
   if (keepWithPreviousSheets != other.keepWithPreviousSheets) {
     return false;
   }
   if (listType != other.listType) {
     return false;
   }
   if (margin == null) {
     if (other.margin != null) {
       return false;
     }
   } else if (!margin.equals(other.margin)) {
     return false;
   }
   if (orphans != other.orphans) {
     return false;
   }
   if (padding == null) {
     if (other.padding != null) {
       return false;
     }
   } else if (!padding.equals(other.padding)) {
     return false;
   }
   if (textBlockProps == null) {
     if (other.textBlockProps != null) {
       return false;
     }
   } else if (!textBlockProps.equals(other.textBlockProps)) {
     return false;
   }
   if (textBorderStyle == null) {
     if (other.textBorderStyle != null) {
       return false;
     }
   } else if (!textBorderStyle.equals(other.textBorderStyle)) {
     return false;
   }
   if (verticalPosition == null) {
     if (other.verticalPosition != null) {
       return false;
     }
   } else if (!verticalPosition.equals(other.verticalPosition)) {
     return false;
   }
   if (widows != other.widows) {
     return false;
   }
   return true;
 }