Project

General

Profile

1
package eu.dnetlib.functionality.modular.ui.oai;
2

    
3
public class TDSRule {
4

    
5
	private String id;
6
	private String title;
7

    
8
	public TDSRule(final String id, final String title) {
9
		super();
10
		this.title = title;
11
		this.id = id;
12
	}
13

    
14
	public TDSRule() {
15
		super();
16
		// TODO Auto-generated constructor stub
17
	}
18

    
19
	public String getTitle() {
20
		return title;
21
	}
22

    
23
	public void setTitle(final String title) {
24
		this.title = title;
25
	}
26

    
27
	public String getId() {
28
		return id;
29
	}
30

    
31
	public void setId(final String id) {
32
		this.id = id;
33
	}
34

    
35
	@Override
36
	public String toString() {
37
		return "TDSRule [id=" + id + ", title=" + title + "]";
38
	}
39

    
40
	@Override
41
	public int hashCode() {
42
		final int prime = 31;
43
		int result = 1;
44
		result = (prime * result) + ((id == null) ? 0 : id.hashCode());
45
		result = (prime * result) + ((title == null) ? 0 : title.hashCode());
46
		return result;
47
	}
48

    
49
	@Override
50
	public boolean equals(final Object obj) {
51
		if (this == obj) return true;
52
		if (obj == null) return false;
53
		if (!(obj instanceof TDSRule)) return false;
54
		TDSRule other = (TDSRule) obj;
55
		if (id == null) {
56
			if (other.id != null) return false;
57
		} else if (!id.equals(other.id)) return false;
58
		if (title == null) {
59
			if (other.title != null) return false;
60
		} else if (!title.equals(other.title)) return false;
61
		return true;
62
	}
63

    
64
}
(7-7/7)