Repository navigation
Expand file tree
/
Copy pathAuthor.java
More file actions
83 lines (68 loc) · 1.87 KB
/
Copy pathAuthor.java
File metadata and controls
83 lines (68 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
* BioJava development code
*
* This code may be freely distributed and modified under the
* terms of the GNU Lesser General Public Licence. This should
* be distributed with the code. If you do not have a copy,
* see:
*
* http://www.gnu.org/copyleft/lesser.html
*
* Copyright for this code is held jointly by the individual
* authors. These should be listed in @author doc comments.
*
* For more information on the BioJava project and its aims,
* or to join the biojava-l mailing list, visit the home page
* at:
*
* http://www.biojava.org/
*
*/
package org.biojava.nbio.structure;
import java.io.Serializable;
/**
* Describes author attributes for author information in a PDB file.
* @author Jules Jacobsen
*/
public class Author implements Serializable{
private static final long serialVersionUID = 4840370515056666418L;
private String surname = "";
private String initials = "";
public String getInitials() {
return initials;
}
public void setInitials(String initials) {
this.initials = initials;
}
public String getSurname() {
return surname;
}
public void setSurname(String surname) {
this.surname = surname;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Author other = (Author) obj;
if ((this.surname == null) ? (other.surname != null) : !this.surname.equals(other.surname)) {
return false;
}
return !((this.initials == null) ? (other.initials != null) : !this.initials.equals(other.initials));
}
@Override
public int hashCode() {
int hash = 3;
hash = 19 * hash + (this.surname != null ? this.surname.hashCode() : 0);
hash = 19 * hash + (this.initials != null ? this.initials.hashCode() : 0);
return hash;
}
@Override
public String toString() {
return initials + surname;
}
}