2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package vamsas.objects.simple;
23 public class SequenceSet implements java.io.Serializable
25 private vamsas.objects.simple.Sequence[] seqs;
31 public SequenceSet(vamsas.objects.simple.Sequence[] seqs)
37 * Gets the seqs value for this SequenceSet.
41 public vamsas.objects.simple.Sequence[] getSeqs()
47 * Sets the seqs value for this SequenceSet.
51 public void setSeqs(vamsas.objects.simple.Sequence[] seqs)
56 private java.lang.Object __equalsCalc = null;
59 public synchronized boolean equals(java.lang.Object obj)
65 if (!(obj instanceof SequenceSet))
69 SequenceSet other = (SequenceSet) obj;
74 if (__equalsCalc != null)
76 return (__equalsCalc == obj);
80 _equals = true && ((this.seqs == null && other.getSeqs() == null) || (this.seqs != null && java.util.Arrays
81 .equals(this.seqs, other.getSeqs())));
86 private boolean __hashCodeCalc = false;
89 public synchronized int hashCode()
95 __hashCodeCalc = true;
97 if (getSeqs() != null)
99 for (int i = 0; i < java.lang.reflect.Array.getLength(getSeqs()); i++)
101 java.lang.Object obj = java.lang.reflect.Array.get(getSeqs(), i);
102 if (obj != null && !obj.getClass().isArray())
104 _hashCode += obj.hashCode();
108 __hashCodeCalc = false;