Package twitter4j

Examples of twitter4j.Trends


  public void obtainsCurrentTrends() throws Exception {
    System.out.println("***************************************************************************");
    System.out.println("Returns the current top 10 trending topics on Twitter.");
    // Returns the current top 10 trending topics on Twitter.
    DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");
    Trends trends = TWITTER_CLIENT.getCurrentTrends();
    System.out.printf("==> Day %s <===\n", dateFormat.format(trends.getTrendAt()));
    if (trends.getTrends() != null) {
      for (Trend trend : trends.getTrends()) {
        System.out.printf("Name:[%s] - Query:[%s] - Url:[%s]\n", trend.getName(), trend.getQuery(), trend.getUrl());
      }
    }
  }
View Full Code Here


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Trends)) return false;

        Trends trends1 = (Trends) o;

        if (asOf != null ? !asOf.equals(trends1.getAsOf()) : trends1.getAsOf() != null)
            return false;
        if (trendAt != null ? !trendAt.equals(trends1.getTrendAt()) : trends1.getTrendAt() != null)
            return false;
        if (!Arrays.equals(trends, trends1.getTrends())) return false;

        return true;
    }
View Full Code Here

TOP

Related Classes of twitter4j.Trends

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.