1 package cz.xelfi.quoridor.webidor;
4 import javax.xml.bind.annotation.XmlAccessType;
5 import javax.xml.bind.annotation.XmlAccessorType;
6 import javax.xml.bind.annotation.XmlAttribute;
7 import javax.xml.bind.annotation.XmlValue;
11 * @author Jaroslav Tulach <jtulach@netbeans.org>
13 @XmlAccessorType(XmlAccessType.FIELD)
16 private String comment;
25 public Note(String comment, Date when, String who) {
26 this.comment = comment;
27 this.when = new Date(when.getTime());
31 public String getComment() {
35 public Date getWhen() {
36 return (Date) when.clone();
39 public String getWho() {
44 public String toString() {
45 return "Note[" + who + "@" + when + ": " + comment + "]";
49 public boolean equals(Object obj) {
53 if (getClass() != obj.getClass()) {
56 final Note other = (Note) obj;
57 if ((this.comment == null) ? (other.comment != null) : !this.comment.equals(other.comment)) {
60 if (this.when != other.when && (this.when == null || !this.when.equals(other.when))) {
63 if ((this.who == null) ? (other.who != null) : !this.who.equals(other.who)) {
70 public int hashCode() {
72 hash = 59 * hash + (this.comment != null ? this.comment.hashCode() : 0);
73 hash = 59 * hash + (this.when != null ? this.when.hashCode() : 0);
74 hash = 59 * hash + (this.who != null ? this.who.hashCode() : 0);