-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRSSItem.java
More file actions
50 lines (41 loc) · 1021 Bytes
/
Copy pathRSSItem.java
File metadata and controls
50 lines (41 loc) · 1021 Bytes
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
import java.io.Serializable;
public class RSSItem extends Document implements Serializable{
private static final long serialVersionUID = 4419209933563095607L;
private String url;
private String src;
public RSSItem(String title, String description, String url){
super(title, description);
this.src = "";
this.url = url;
}
public RSSItem(String src, String title, String description, String url){
super(title, description);
this.src = src;
this.url = url;
}
public String getUrl(){
return url;
}
public void setSource(String src){
this.src = src;
}
public String getSource(){
return src;
}
@Override
public String toString(){
return super.toString()+"url: "+url;
}
@Override
public boolean equals(Object o){
if ( this == o ) return true;
if ( !(o instanceof RSSItem) ) return false;
RSSItem item = (RSSItem)o;
return super.equals(item) &&
item.getUrl().equals(url);
}
@Override
public int hashCode(){
return super.hashCode() + url.hashCode();
}
}