Пример #1
0
 @Override
 public int hashCode() {
   int result = spreadSheet != null ? spreadSheet.hashCode() : 0;
   result = 31 * result + (location != null ? location.hashCode() : 0);
   result = 31 * result + (expression != null ? expression.hashCode() : 0);
   result = 31 * result + (isModified ? 1 : 0);
   return result;
 }
Пример #2
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    CellImpl cell = (CellImpl) o;

    if (isModified != cell.isModified) return false;
    if (spreadSheet != null ? !spreadSheet.equals(cell.spreadSheet) : cell.spreadSheet != null)
      return false;
    if (location != null ? !location.equals(cell.location) : cell.location != null) return false;
    if (expression != null ? !expression.equals(cell.expression) : cell.expression != null)
      return false;
    return true;
  }