Last active
August 29, 2015 14:15
-
-
Save DannyDelott/daf4d6cd577c14f06ae5 to your computer and use it in GitHub Desktop.
Stores collected tweets from the Twitter API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TweetBuffer { | |
private int id; | |
private String saveDirectory; | |
private HashSet<Status> tweets; | |
private boolean isProcessing; | |
// constructor | |
public TweetBuffer(int id, String saveDirectory) { | |
this.id = id; | |
this.saveDirectory = saveDirectory; | |
tweets = new HashSet<Status>(); | |
isProcessing = false; | |
} | |
// public methods | |
public void addStatus(Status status) {tweets.add(status);} | |
public void clearBuffer() {tweets.clear();} | |
// getters | |
public int getId() {return id;} | |
public String getSaveDirectory() {return saveDirectory;} | |
public HashSet<Status> getTweets() {return tweets;} | |
public boolean isProcessing() {return isProcessing;} | |
// setters | |
public void setProcessing(boolean processing) { | |
isProcessing = processing; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment