Guest User

Untitled

a guest
Nov 21st, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. @Override
  2. public int hashCode() {
  3. final int prime = 31;
  4. int result = 1;
  5. result = prime * result + ((cronExpression == null) ? 0 : cronExpression.hashCode());
  6. result = prime * result + ((subject == null) ? 0 : subject.hashCode());
  7. result = prime * result + timeout;
  8. result = prime * result + ((type == null) ? 0 : type.hashCode());
  9. return result;
  10. }
  11.  
  12. @Override
  13. public boolean equals(Object obj) {
  14. if (this == obj)
  15. return true;
  16. if (obj == null)
  17. return false;
  18. if (!(obj instanceof Reminder))
  19. return false;
  20. Reminder other = (Reminder) obj;
  21. if (cronExpression == null) {
  22. if (other.cronExpression != null)
  23. return false;
  24. } else if (!cronExpression.equals(other.cronExpression))
  25. return false;
  26. if (subject == null) {
  27. if (other.subject != null)
  28. return false;
  29. } else if (!subject.equals(other.subject))
  30. return false;
  31. if (timeout != other.timeout)
  32. return false;
  33. if (type == null) {
  34. if (other.type != null)
  35. return false;
  36. } else if (!type.equals(other.type))
  37. return false;
  38. return true;
  39. }
Add Comment
Please, Sign In to add comment