You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.5 KiB
46 lines
1.5 KiB
package com.example.datacollect.w9.model;
|
|
|
|
public class Article {
|
|
private String title;
|
|
private String url;
|
|
private String content;
|
|
private String author;
|
|
private String publishDate;
|
|
|
|
public Article(String title, String url, String content) {
|
|
this.title = title;
|
|
this.url = url;
|
|
this.content = content;
|
|
}
|
|
|
|
public Article(String title, String url, String content, String author, String publishDate) {
|
|
this.title = title;
|
|
this.url = url;
|
|
this.content = content;
|
|
this.author = author;
|
|
this.publishDate = publishDate;
|
|
}
|
|
|
|
// getter / setter
|
|
public String getTitle() { return title; }
|
|
public String getUrl() { return url; }
|
|
public String getContent() { return content; }
|
|
public String getAuthor() { return author; }
|
|
public String getPublishDate() { return publishDate; }
|
|
|
|
public void setTitle(String title) { this.title = title; }
|
|
public void setUrl(String url) { this.url = url; }
|
|
public void setContent(String content) { this.content = content; }
|
|
public void setAuthor(String author) { this.author = author; }
|
|
public void setPublishDate(String publishDate) { this.publishDate = publishDate; }
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "Article{" +
|
|
"title='" + title + '\'' +
|
|
", url='" + url + '\'' +
|
|
", author='" + author + '\'' +
|
|
", publishDate='" + publishDate + '\'' +
|
|
'}';
|
|
}
|
|
}
|