X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2Fscoremodels%2FSimilarityParams.java;h=5c477035c3a403e9989e3950d50b62bea8719d85;hb=refs%2Fheads%2Ffeatures%2FJAL-1767pcaInProject;hp=58b08dd7928f27b8a933a97135b6ccb6c01953d0;hpb=5f38ef0b2ae1355b51fd79cfac56f261f4bd78a7;p=jalview.git diff --git a/src/jalview/analysis/scoremodels/SimilarityParams.java b/src/jalview/analysis/scoremodels/SimilarityParams.java index 58b08dd..5c47703 100644 --- a/src/jalview/analysis/scoremodels/SimilarityParams.java +++ b/src/jalview/analysis/scoremodels/SimilarityParams.java @@ -147,4 +147,57 @@ public class SimilarityParams implements SimilarityParamsI { return matchGaps; } + + /** + * IDE-generated hashCode method + */ + @Override + public int hashCode() + { + final int prime = 31; + int result = 1; + result = prime * result + (denominateByShortestLength ? 1231 : 1237); + result = prime * result + (includeGappedColumns ? 1231 : 1237); + result = prime * result + (includeGaps ? 1231 : 1237); + result = prime * result + (matchGaps ? 1231 : 1237); + return result; + } + + /** + * IDE-generated equals method + */ + @Override + public boolean equals(Object obj) + { + if (this == obj) + { + return true; + } + if (obj == null) + { + return false; + } + if (getClass() != obj.getClass()) + { + return false; + } + SimilarityParams other = (SimilarityParams) obj; + if (denominateByShortestLength != other.denominateByShortestLength) + { + return false; + } + if (includeGappedColumns != other.includeGappedColumns) + { + return false; + } + if (includeGaps != other.includeGaps) + { + return false; + } + if (matchGaps != other.matchGaps) + { + return false; + } + return true; + } }