twitter4j
Class Trends

java.lang.Object
  extended by twitter4j.TwitterResponse
      extended by twitter4j.Trends
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Trends>

public class Trends
extends TwitterResponse
implements java.lang.Comparable<Trends>

A data class representing Treands.

Since:
Twitter4J 2.0.2
Author:
Yusuke Yamamoto - yusuke at mac.com
See Also:
Serialized Form

Field Summary
private  java.util.Date asOf
           
private static long serialVersionUID
           
private  java.util.Date trendAt
           
private  Trend[] trends
           
 
Constructor Summary
Trends(Response res, java.util.Date asOf, java.util.Date trendAt, Trend[] trends)
           
 
Method Summary
 int compareTo(Trends that)
           
(package private) static Trends constructTrends(Response res)
           
(package private) static java.util.List<Trends> constructTrendsList(Response res)
           
 java.util.Date getAsOf()
           
 java.util.Date getTrendAt()
           
 Trend[] getTrends()
           
private static Trend[] jsonArrayToTrendArray(twitter4j.org.json.JSONArray array)
           
private static java.util.Date parseDate(java.lang.String asOfStr)
           
 
Methods inherited from class twitter4j.TwitterResponse
ensureRootNodeNameIs, ensureRootNodeNameIs, ensureRootNodeNameIs, getBoolean, getChildBoolean, getChildDate, getChildDate, getChildInt, getChildLong, getChildText, getInt, getLong, getRateLimitLimit, getRateLimitRemaining, getRateLimitReset, getString, getTextContent, isRootNodeNilClasses, parseDate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

asOf

private java.util.Date asOf

trendAt

private java.util.Date trendAt

trends

private Trend[] trends

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

Trends

Trends(Response res,
       java.util.Date asOf,
       java.util.Date trendAt,
       Trend[] trends)
 throws TwitterException
Throws:
TwitterException
Method Detail

compareTo

public int compareTo(Trends that)
Specified by:
compareTo in interface java.lang.Comparable<Trends>

constructTrendsList

static java.util.List<Trends> constructTrendsList(Response res)
                                           throws TwitterException
Throws:
TwitterException

constructTrends

static Trends constructTrends(Response res)
                       throws TwitterException
Throws:
TwitterException

parseDate

private static java.util.Date parseDate(java.lang.String asOfStr)
                                 throws TwitterException
Throws:
TwitterException

jsonArrayToTrendArray

private static Trend[] jsonArrayToTrendArray(twitter4j.org.json.JSONArray array)
                                      throws twitter4j.org.json.JSONException
Throws:
twitter4j.org.json.JSONException

getTrends

public Trend[] getTrends()

getAsOf

public java.util.Date getAsOf()

getTrendAt

public java.util.Date getTrendAt()