Debian Codegraph @

src/vamsas/objects/simple/Alignment.java

raw
1 /*
2 * Jalview - A Sequence Alignment Editor and Viewer (2.11.5.0)
3 * Copyright (C) 2025 The Jalview Authors
4 *
5 * This file is part of Jalview.
6 *
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.
11 *
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.
16 *
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.
20 */
21 package vamsas.objects.simple;
22
23 public class Alignment extends vamsas.objects.simple.Object
24 implements java.io.Serializable
25 {
26 private java.lang.String gapchar;
27
28 private java.lang.String[] method;
29
30 private vamsas.objects.simple.SequenceSet seqs;
31
32 public Alignment()
33 {
34 }
35
36 public Alignment(java.lang.String gapchar, java.lang.String[] method,
37 vamsas.objects.simple.SequenceSet seqs)
38 {
39 this.gapchar = gapchar;
40 this.method = method;
41 this.seqs = seqs;
42 }
43
44 /**
45 * Gets the gapchar value for this Alignment.
46 *
47 * @return gapchar
48 */
49 public java.lang.String getGapchar()
50 {
51 return gapchar;
52 }
53
54 /**
55 * Sets the gapchar value for this Alignment.
56 *
57 * @param gapchar
58 */
59 public void setGapchar(java.lang.String gapchar)
60 {
61 this.gapchar = gapchar;
62 }
63
64 /**
65 * Gets the method value for this Alignment.
66 *
67 * @return method
68 */
69 public java.lang.String[] getMethod()
70 {
71 return method;
72 }
73
74 /**
75 * Sets the method value for this Alignment.
76 *
77 * @param method
78 */
79 public void setMethod(java.lang.String[] method)
80 {
81 this.method = method;
82 }
83
84 /**
85 * Gets the seqs value for this Alignment.
86 *
87 * @return seqs
88 */
89 public vamsas.objects.simple.SequenceSet getSeqs()
90 {
91 return seqs;
92 }
93
94 /**
95 * Sets the seqs value for this Alignment.
96 *
97 * @param seqs
98 */
99 public void setSeqs(vamsas.objects.simple.SequenceSet seqs)
100 {
101 this.seqs = seqs;
102 }
103
104 private java.lang.Object __equalsCalc = null;
105
106 @Override
107 public synchronized boolean equals(java.lang.Object obj)
108 {
109 if (obj == null)
110 {
111 return false;
112 }
113 if (!(obj instanceof Alignment))
114 {
115 return false;
116 }
117 Alignment other = (Alignment) obj;
118 if (this == obj)
119 {
120 return true;
121 }
122 if (__equalsCalc != null)
123 {
124 return (__equalsCalc == obj);
125 }
126 __equalsCalc = obj;
127 boolean _equals;
128 _equals = super.equals(obj)
129 && ((this.gapchar == null && other.getGapchar() == null)
130 || (this.gapchar != null
131 && this.gapchar.equals(other.getGapchar())))
132 && ((this.method == null && other.getMethod() == null)
133 || (this.method != null && java.util.Arrays
134 .equals(this.method, other.getMethod())))
135 && ((this.seqs == null && other.getSeqs() == null)
136 || (this.seqs != null
137 && this.seqs.equals(other.getSeqs())));
138 __equalsCalc = null;
139 return _equals;
140 }
141
142 private boolean __hashCodeCalc = false;
143
144 @Override
145 public synchronized int hashCode()
146 {
147 if (__hashCodeCalc)
148 {
149 return 0;
150 }
151 __hashCodeCalc = true;
152 int _hashCode = super.hashCode();
153 if (getGapchar() != null)
154 {
155 _hashCode += getGapchar().hashCode();
156 }
157 if (getMethod() != null)
158 {
159 for (int i = 0; i < java.lang.reflect.Array
160 .getLength(getMethod()); i++)
161 {
162 java.lang.Object obj = java.lang.reflect.Array.get(getMethod(), i);
163 if (obj != null && !obj.getClass().isArray())
164 {
165 _hashCode += obj.hashCode();
166 }
167 }
168 }
169 if (getSeqs() != null)
170 {
171 _hashCode += getSeqs().hashCode();
172 }
173 __hashCodeCalc = false;
174 return _hashCode;
175 }
176
177 }