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>

public class UserAccountCreationYearTweetFilter extends OnlineTweetFilter
Filter Tweets according to the creation year of the author's account
Author:
Virginie Galtier
  • Field Details

    • creationYear

      protected int creationYear
      The 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 class TweetFilter
      Parameters:
      tweet - Tweet to examine
      Returns:
      true if the Tweet complies with the filter, false if it doesn't match the filter conditions