}\r
writer.flush();\r
}\r
+ \r
+\r
+ @Override\r
+ public int hashCode() {\r
+ final int prime = 31;\r
+ int result = 1;\r
+ result = prime * result\r
+ + ((seqScores == null) ? 0 : seqScores.hashCode());\r
+ return result;\r
+ }\r
+\r
+ @Override\r
+ public boolean equals(Object obj) {\r
+ if (this == obj)\r
+ return true;\r
+ if (obj == null)\r
+ return false;\r
+ if (getClass() != obj.getClass())\r
+ return false;\r
+ ScoreManager other = (ScoreManager) obj;\r
+ if (seqScores == null) {\r
+ if (other.seqScores != null)\r
+ return false;\r
+ } else if (!seqScores.equals(other.seqScores))\r
+ return false;\r
+ return true;\r
+ }\r
+\r
+\r
\r
@XmlAccessorType(XmlAccessType.FIELD)\r
public static class ScoreHolder {\r
public int getNumberOfScores() {\r
return scores.size();\r
}\r
+\r
+ @Override\r
+ public int hashCode() {\r
+ final int prime = 17;\r
+ int result = 1;\r
+ result = prime * result + ((id == null) ? 0 : id.hashCode());\r
+ result = prime * result\r
+ + ((scores == null) ? 0 : scores.hashCode());\r
+ return result;\r
+ }\r
+\r
+ @Override\r
+ public boolean equals(Object obj) {\r
+ if (this == obj)\r
+ return true;\r
+ if (obj == null)\r
+ return false;\r
+ if (getClass() != obj.getClass())\r
+ return false;\r
+ ScoreHolder other = (ScoreHolder) obj;\r
+ if (id == null) {\r
+ if (other.id != null)\r
+ return false;\r
+ } else if (!id.equals(other.id))\r
+ return false;\r
+ if (scores == null) {\r
+ if (other.scores != null)\r
+ return false;\r
+ } else if (!scores.equals(other.scores))\r
+ return false;\r
+ return true;\r
+ }\r
+ \r
+ \r
}\r
}\r
import org.testng.annotations.Test;\r
\r
import compbio.data.sequence.Score;\r
+import compbio.data.sequence.ScoreManager;\r
import compbio.engine.AsyncExecutor;\r
import compbio.engine.Configurator;\r
import compbio.engine.FilePuller;\r
lr.executeJob();\r
ConfiguredExecutable<?> al1 = lr.waitForResult();\r
assertNotNull(al1.getResults());\r
- HashSet<Score> annotations = confAAcon.getResults();\r
+ ScoreManager annotations = confAAcon.getResults();\r
assertNotNull(annotations);\r
- assertEquals(annotations.size(), 18);\r
+ assertEquals(annotations.asSet().size(), 18);\r
assertEquals(al1.getResults(), annotations);\r
} catch (JobSubmissionException e) {\r
e.printStackTrace();\r
lr.executeJob();\r
ConfiguredExecutable<?> al1 = lr.waitForResult();\r
assertNotNull(al1.getResults());\r
- HashSet<Score> annotations = confAAcon.getResults();\r
+ ScoreManager annotations = confAAcon.getResults();\r
assertNotNull(annotations);\r
- assertEquals(annotations.size(), 13);\r
+ assertEquals(annotations.asSet().size(), 13);\r
assertEquals(al1.getResults(), annotations);\r
} catch (JobSubmissionException e) {\r
e.printStackTrace();\r
lr.executeJob();\r
ConfiguredExecutable<?> al1 = lr.waitForResult();\r
assertNotNull(al1.getResults());\r
- HashSet<Score> annotations = confAAcon.getResults();\r
+ ScoreManager annotations = confAAcon.getResults();\r
assertNotNull(annotations);\r
- assertEquals(annotations.size(), 3);\r
+ assertEquals(annotations.asSet().size(), 3);\r
assertEquals(al1.getResults(), annotations);\r
\r
} catch (JobSubmissionException e) {\r
import org.testng.annotations.Test;\r
\r
import compbio.data.sequence.Score;\r
+import compbio.data.sequence.ScoreManager;\r
import compbio.engine.AsyncExecutor;\r
import compbio.engine.Configurator;\r
import compbio.engine.FilePuller;\r
lr.executeJob();\r
ConfiguredExecutable<?> al1 = lr.waitForResult();\r
assertNotNull(al1.getResults());\r
- Map<String,Set<Score>> al2 = confDisembl.getResults();\r
+ ScoreManager al2 = confDisembl.getResults();\r
assertNotNull(al2);\r
- assertEquals(al2.size(), 3);\r
+ assertEquals(al2.asMap().size(), 3);\r
assertEquals(al1.getResults(), al2);\r
} catch (JobSubmissionException e) {\r
e.printStackTrace();\r
import org.testng.annotations.Test;\r
\r
import compbio.data.sequence.Score;\r
+import compbio.data.sequence.ScoreManager;\r
import compbio.engine.AsyncExecutor;\r
import compbio.engine.Configurator;\r
import compbio.engine.SyncExecutor;\r
lr.executeJob();\r
ConfiguredExecutable<?> al1 = lr.waitForResult();\r
assertNotNull(al1.getResults());\r
- Map<String, Set<Score>> al2 = confGlobPlot.getResults();\r
+ ScoreManager al2 = confGlobPlot.getResults();\r
assertNotNull(al2);\r
- assertEquals(al2.size(), 3);\r
+ assertEquals(al2.asMap().size(), 3);\r
assertEquals(al1.getResults(), al2);\r
} catch (JobSubmissionException e) {\r
e.printStackTrace();\r
import org.testng.annotations.Test;\r
\r
import compbio.data.sequence.Score;\r
+import compbio.data.sequence.ScoreManager;\r
import compbio.engine.AsyncExecutor;\r
import compbio.engine.Configurator;\r
import compbio.engine.FilePuller;\r
lr.executeJob();\r
ConfiguredExecutable<?> al1 = lr.waitForResult();\r
assertNotNull(al1.getResults());\r
- Map<String, Score> al2 = confJronn.getResults();\r
+ ScoreManager al2 = confJronn.getResults();\r
assertNotNull(al2);\r
- assertEquals(al2.size(), 3);\r
+ assertEquals(al2.asMap().size(), 3);\r
assertEquals(al1.getResults(), al2);\r
} catch (JobSubmissionException e) {\r
e.printStackTrace();\r
lr.executeJob();\r
ConfiguredExecutable<?> al1 = lr.waitForResult();\r
assertNotNull(al1.getResults());\r
- Map<String, Score> al2 = confJronn.getResults();\r
+ ScoreManager al2 = confJronn.getResults();\r
assertNotNull(al2);\r
- assertEquals(al2.size(), 3);\r
+ assertEquals(al2.asMap().size(), 3);\r
assertEquals(al1.getResults(), al2);\r
} catch (JobSubmissionException e) {\r
e.printStackTrace();\r