| 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 |
|
package net.sourceforge.pebble.aggregator; |
| 33 |
|
|
| 34 |
|
import net.sourceforge.pebble.util.StringUtils; |
| 35 |
|
|
| 36 |
|
import java.util.Date; |
| 37 |
|
|
| 38 |
|
|
| 39 |
|
@author |
| 40 |
|
|
|
|
|
| 0% |
Uncovered Elements: 41 (41) |
Complexity: 16 |
Complexity Density: 0,7 |
|
| 41 |
|
public class NewsFeedEntry { |
| 42 |
|
|
| 43 |
|
private String link; |
| 44 |
|
private String title; |
| 45 |
|
private String body; |
| 46 |
|
private String author; |
| 47 |
|
private Date date; |
| 48 |
|
private NewsFeed feed; |
| 49 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0,2 |
|
| 50 |
0
|
public NewsFeedEntry(String link, String title, String body, String author, Date date) {... |
| 51 |
0
|
this.link = link; |
| 52 |
0
|
this.title = title; |
| 53 |
0
|
this.body = body; |
| 54 |
0
|
this.author = author; |
| 55 |
0
|
this.date = date; |
| 56 |
|
} |
| 57 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 58 |
0
|
void setFeed(NewsFeed feed) {... |
| 59 |
0
|
this.feed = feed; |
| 60 |
|
} |
| 61 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 62 |
0
|
public NewsFeed getFeed() {... |
| 63 |
0
|
return feed; |
| 64 |
|
} |
| 65 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 66 |
0
|
public String getLink() {... |
| 67 |
0
|
return link; |
| 68 |
|
} |
| 69 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 70 |
0
|
public String getTitle() {... |
| 71 |
0
|
return title; |
| 72 |
|
} |
| 73 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 74 |
0
|
public String getBody() {... |
| 75 |
0
|
return body; |
| 76 |
|
} |
| 77 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 78 |
0
|
public String getTruncatedBody() {... |
| 79 |
0
|
return StringUtils.truncate(getBody()); |
| 80 |
|
} |
| 81 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 82 |
0
|
public String getAuthor() {... |
| 83 |
0
|
return author; |
| 84 |
|
} |
| 85 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 86 |
0
|
public Date getDate() {... |
| 87 |
0
|
return this.date; |
| 88 |
|
} |
| 89 |
|
|
|
|
|
| 0% |
Uncovered Elements: 14 (14) |
Complexity: 5 |
Complexity Density: 0,62 |
|
| 90 |
0
|
public boolean equals(Object o) {... |
| 91 |
0
|
if (this == o) return true; |
| 92 |
0
|
if (o == null || getClass() != o.getClass()) return false; |
| 93 |
|
|
| 94 |
0
|
NewsFeedEntry feedEntry = (NewsFeedEntry) o; |
| 95 |
|
|
| 96 |
0
|
if (!link.equals(feedEntry.link)) return false; |
| 97 |
|
|
| 98 |
0
|
return true; |
| 99 |
|
} |
| 100 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 101 |
0
|
public int hashCode() {... |
| 102 |
0
|
return link.hashCode(); |
| 103 |
|
} |
| 104 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 105 |
0
|
public String toString() {... |
| 106 |
0
|
return "title=" + title + " | body=" + body + " | author=" + author + " | date=" + date + " | link=" + link; |
| 107 |
|
} |
| 108 |
|
|
| 109 |
|
} |