blob: 19838e796f5c2269dccace54f4da69016dc1b8a0 (
plain)
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
|
package main;
import org.json.JSONObject;
import provider.ResultListener;
/**
* Calculates statistic about the received tweets.
*
* @author Peter Wu
*/
public class TweetCounter implements ResultListener {
private int tweetCount = 0;
@Override
public void tweetGenerated(JSONObject obj) {
tweetCount++;
}
@Override
public void profileGenerated(JSONObject obj) {
// ignored
}
public int getTweetCount() {
return tweetCount;
}
}
|