private Map<Long, Integer> readOccurrenceFromTestCaseSources(List<TopologyTestRunCaseSource> testRunCaseSources) { return testRunCaseSources.stream() .collect(toMap(s -> s.getSourceId(), s -> s.getOccurrence())); }
@Override public int hashCode() { int result = getId() != null ? getId().hashCode() : 0; result = 31 * result + (getTestCaseId() != null ? getTestCaseId().hashCode() : 0); result = 31 * result + (getSourceId() != null ? getSourceId().hashCode() : 0); result = 31 * result + (getVersionId() != null ? getVersionId().hashCode() : 0); result = 31 * result + (getRecords() != null ? getRecords().hashCode() : 0); result = 31 * result + (getOccurrence() != null ? getOccurrence().hashCode() : 0); result = 31 * result + (getSleepMsPerIteration() != null ? getSleepMsPerIteration().hashCode() : 0); result = 31 * result + (getTimestamp() != null ? getTimestamp().hashCode() : 0); return result; }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof TopologyTestRunCaseSource)) return false; TopologyTestRunCaseSource that = (TopologyTestRunCaseSource) o; if (getId() != null ? !getId().equals(that.getId()) : that.getId() != null) return false; if (getTestCaseId() != null ? !getTestCaseId().equals(that.getTestCaseId()) : that.getTestCaseId() != null) return false; if (getSourceId() != null ? !getSourceId().equals(that.getSourceId()) : that.getSourceId() != null) return false; if (getVersionId() != null ? !getVersionId().equals(that.getVersionId()) : that.getVersionId() != null) return false; if (getRecords() != null ? !getRecords().equals(that.getRecords()) : that.getRecords() != null) return false; if (getOccurrence() != null ? !getOccurrence().equals(that.getOccurrence()) : that.getOccurrence() != null) return false; if (getSleepMsPerIteration() != null ? !getSleepMsPerIteration().equals(that.getSleepMsPerIteration()) : that.getSleepMsPerIteration() != null) return false; return getTimestamp() != null ? getTimestamp().equals(that.getTimestamp()) : that.getTimestamp() == null; }
public TopologyTestRunCaseSource(TopologyTestRunCaseSource other) { if (other != null) { setId(other.getId()); setTestCaseId(other.getTestCaseId()); setSourceId(other.getSourceId()); setVersionId(other.getVersionId()); setRecords(other.getRecords()); setOccurrence(other.getOccurrence()); setSleepMsPerIteration(other.getSleepMsPerIteration()); setTimestamp(other.getTimestamp()); } }