-
Notifications
You must be signed in to change notification settings - Fork 0
/
TweetData.java
75 lines (67 loc) · 1.81 KB
/
TweetData.java
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import javax.swing.ImageIcon;
/**
* TweetData
*
* @author William Chern & Nishan D'Souza
* @version 5/11/2016
*/
public class TweetData
/*
* This class is a means of storing twitter data in a more efficient manner, making it easy to layout things in the mainframe class
*/
{
private String userHandle;
private String tweetText;
private ImageIcon userIcon;
private int retweetCount;
private int favoriteCount;
private int numTweetsCount;
private int followersCount;
private int followingCount;
private long tweetID;
private long userID;
// various private instance fields to hold the values of the twitter object
public TweetData(String u, String t, ImageIcon i, int r, int f, int numTweets, int followers, int following, long id, long uid) {
userHandle = u;
tweetText = t;
userIcon = i;
retweetCount = r;
favoriteCount = f;
numTweetsCount = numTweets;
followersCount = followers;
followingCount = following;
tweetID = id;
userID = uid;
}
// various accessor methods for the TweetDate class
public String getUserHandle() {
return userHandle;
}
public String getTweetText() {
return tweetText;
}
public ImageIcon getUserIcon() {
return userIcon;
}
public int getRetweetCount() {
return retweetCount;
}
public int getFavoriteCount() {
return favoriteCount;
}
public int getUserNumTweets() {
return numTweetsCount;
}
public int getUserFollowers() {
return followersCount;
}
public int getUserFollowing() {
return followingCount;
}
public long getID() {
return tweetID;
}
public long getUserID() {
return userID;
}
}