Package tweetoscope.tweetsFilter
Class UserAccountCreationYearTweetFilter
java.lang.Object
tweetoscope.tweetsFilter.TweetFilter
tweetoscope.tweetsFilter.OnlineTweetFilter
tweetoscope.tweetsFilter.UserAccountCreationYearTweetFilter
- All Implemented Interfaces:
Flow.Publisher<com.twitter.clientlib.model.Tweet>
,Flow.Subscriber<com.twitter.clientlib.model.Tweet>
Filter Tweets according to the creation year of the author's account
- Author:
- Virginie Galtier
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
The targeted max creation year (excluded)Fields inherited from class tweetoscope.tweetsFilter.OnlineTweetFilter
BEARER_TOKEN, twitterApiInstance
Fields inherited from class tweetoscope.tweetsFilter.TweetFilter
subscribers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
match
(com.twitter.clientlib.model.Tweet tweet) return true if the tweet was posted by an account created before 01/01/creationYearMethods inherited from class tweetoscope.tweetsFilter.TweetFilter
onComplete, onError, onNext, onSubscribe, subscribe
-
Field Details
-
creationYear
protected int creationYearThe targeted max creation year (excluded)
-
-
Constructor Details
-
UserAccountCreationYearTweetFilter
public UserAccountCreationYearTweetFilter(int creationYear)
-
-
Method Details
-
match
protected boolean match(com.twitter.clientlib.model.Tweet tweet) return true if the tweet was posted by an account created before 01/01/creationYear- Specified by:
match
in classTweetFilter
- Parameters:
tweet
- Tweet to examine- Returns:
- true if the Tweet complies with the filter, false if it doesn't match the filter conditions
-