예제 #1
0
 @Override
 public int hashCode() {
   int result = task != null ? task.hashCode() : 0;
   result = 31 * result + (callback != null ? callback.hashCode() : 0);
   result = 31 * result + (retryPolicy != null ? retryPolicy.hashCode() : 0);
   return result;
 }
예제 #2
0
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    TaskRunnerWorkItem that = (TaskRunnerWorkItem) o;

    if (callback != null ? !callback.equals(that.callback) : that.callback != null) {
      return false;
    }
    if (retryPolicy != null ? !retryPolicy.equals(that.retryPolicy) : that.retryPolicy != null) {
      return false;
    }
    if (task != null ? !task.equals(that.task) : that.task != null) {
      return false;
    }

    return true;
  }