@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((fJob == null) ? 0 : fJob.hashCode()); result = prime * result + ((fTask == null) ? 0 : fTask.hashCode()); return result; }
@Override public boolean equals(final Object obj) { if (this == obj) return true; if (!(obj instanceof JobTasksMatch)) { // this should be infrequent if (obj == null) { return false; } if (!(obj instanceof IPatternMatch)) { return false; } IPatternMatch otherSig = (IPatternMatch) obj; if (!specification().equals(otherSig.specification())) return false; return Arrays.deepEquals(toArray(), otherSig.toArray()); } JobTasksMatch other = (JobTasksMatch) obj; if (fJob == null) { if (other.fJob != null) return false; } else if (!fJob.equals(other.fJob)) return false; if (fTask == null) { if (other.fTask != null) return false; } else if (!fTask.equals(other.fTask)) return false; return true; }