Class LangTweetFilter

java.lang.Object
tweetoscope.tweetsFilter.TweetFilter
tweetoscope.tweetsFilter.LangTweetFilter
All Implemented Interfaces:
Flow.Publisher<com.twitter.clientlib.model.Tweet>, Flow.Subscriber<com.twitter.clientlib.model.Tweet>

public class LangTweetFilter extends TweetFilter
Filters Tweets according to the detected language.
Author:
Virginie Galtier
  • Field Details

    • language

      protected String language
      target language to match (examples: "fr", "en"...)
  • Constructor Details

    • LangTweetFilter

      public LangTweetFilter(String language)
      Creates a filter that tests whether the "language" tag of a Tweet (if it is set) equals a given code.
      Parameters:
      language - target language to match (example: "en")
  • Method Details

    • match

      protected boolean match(com.twitter.clientlib.model.Tweet tweet)
      Description copied from class: TweetFilter
      Tests the filter conditions
      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