twitter4j
Class TrendsJSONImpl
java.lang.Object
twitter4j.TrendsJSONImpl
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Trends>, Trends
final class TrendsJSONImpl
- extends java.lang.Object
- implements Trends, java.io.Serializable
A data class representing Trends.
- Since:
- Twitter4J 2.0.2
- Author:
- Yusuke Yamamoto - yusuke at mac.com
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
asOf
private java.util.Date asOf
trendAt
private java.util.Date trendAt
trends
private Trend[] trends
location
private Location location
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
TrendsJSONImpl
TrendsJSONImpl(twitter4j.internal.http.HttpResponse res)
throws TwitterException
- Throws:
TwitterException
TrendsJSONImpl
TrendsJSONImpl(java.lang.String jsonStr)
throws TwitterException
- Throws:
TwitterException
TrendsJSONImpl
TrendsJSONImpl(java.util.Date asOf,
Location location,
java.util.Date trendAt,
Trend[] trends)
compareTo
public int compareTo(Trends that)
- Specified by:
compareTo
in interface java.lang.Comparable<Trends>
init
void init(java.lang.String jsonStr)
throws TwitterException
- Throws:
TwitterException
createTrendsList
static java.util.List<Trends> createTrendsList(twitter4j.internal.http.HttpResponse res)
throws TwitterException
- Throws:
TwitterException
extractLocation
private static Location extractLocation(twitter4j.internal.org.json.JSONObject json)
throws TwitterException
- Throws:
TwitterException
parseTrendsDate
private static java.util.Date parseTrendsDate(java.lang.String asOfStr)
throws TwitterException
- Throws:
TwitterException
jsonArrayToTrendArray
private static Trend[] jsonArrayToTrendArray(twitter4j.internal.org.json.JSONArray array)
throws twitter4j.internal.org.json.JSONException
- Throws:
twitter4j.internal.org.json.JSONException
getTrends
public Trend[] getTrends()
-
- Specified by:
getTrends
in interface Trends
getLocation
public Location getLocation()
- Returns the location associated with the trends.
This method is effective only with getLocalTrends() method.
i.e. The return value of this method will be null with Search API Methods (getTrends(), getCurrentTrends(), getDailyTrends(), and getWeeklyTrends()).
- Specified by:
getLocation
in interface Trends
- Returns:
- location
getAsOf
public java.util.Date getAsOf()
-
- Specified by:
getAsOf
in interface Trends
getTrendAt
public java.util.Date getTrendAt()
-
- Specified by:
getTrendAt
in interface Trends
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object