twitter4j
Class StatusJSONImpl

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

final class StatusJSONImpl
extends TwitterResponseImpl
implements Status, java.io.Serializable

A data class representing one single status of a user.

Author:
Yusuke Yamamoto - yusuke at mac.com

Field Summary
private  java.lang.String[] contributors
           
private  java.util.Date createdAt
           
private  GeoLocation geoLocation
           
private  long id
           
private  java.lang.String inReplyToScreenName
           
private  long inReplyToStatusId
           
private  int inReplyToUserId
           
private  boolean isFavorited
           
private  boolean isTruncated
           
private  Place place
           
private  Status retweetedStatus
           
private static long serialVersionUID
           
private  java.lang.String source
           
private  java.lang.String text
           
private  User user
           
 
Constructor Summary
StatusJSONImpl(twitter4j.internal.http.HttpResponse res)
           
StatusJSONImpl(twitter4j.internal.org.json.JSONObject json)
           
 
Method Summary
 int compareTo(Status that)
           
(package private) static ResponseList<Status> createStatusList(twitter4j.internal.http.HttpResponse res)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String[] getContributors()
          Returns an array of contributors, or null if no contributor is associated with this status.
 java.util.Date getCreatedAt()
          Return the created_at
 GeoLocation getGeoLocation()
          Returns The location that this tweet refers to if available.
 long getId()
          Returns the id of the status
 java.lang.String getInReplyToScreenName()
          Returns the in_reply_to_screen_name
 long getInReplyToStatusId()
          Returns the in_reply_tostatus_id
 int getInReplyToUserId()
          Returns the in_reply_user_id
 Place getPlace()
          Returns the place attached to this status
 Status getRetweetedStatus()
          
 java.lang.String getSource()
          Returns the source
 java.lang.String getText()
          Returns the text of the status
 User getUser()
          Return the user associated with the status.
This can be null if the instance if from User.getStatus().
 int hashCode()
           
private  void init(twitter4j.internal.org.json.JSONObject json)
           
 boolean isFavorited()
          Test if the status is favorited
 boolean isRetweet()
          
 boolean isTruncated()
          Test if the status is truncated
 java.lang.String toString()
           
 
Methods inherited from class twitter4j.TwitterResponseImpl
getRateLimitStatus
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface twitter4j.TwitterResponse
getRateLimitStatus
 

Field Detail

createdAt

private java.util.Date createdAt

id

private long id

text

private java.lang.String text

source

private java.lang.String source

isTruncated

private boolean isTruncated

inReplyToStatusId

private long inReplyToStatusId

inReplyToUserId

private int inReplyToUserId

isFavorited

private boolean isFavorited

inReplyToScreenName

private java.lang.String inReplyToScreenName

geoLocation

private GeoLocation geoLocation

place

private Place place

contributors

private java.lang.String[] contributors

retweetedStatus

private Status retweetedStatus

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

user

private User user
Constructor Detail

StatusJSONImpl

StatusJSONImpl(twitter4j.internal.http.HttpResponse res)
         throws TwitterException
Throws:
TwitterException

StatusJSONImpl

StatusJSONImpl(twitter4j.internal.org.json.JSONObject json)
         throws TwitterException,
                twitter4j.internal.org.json.JSONException
Throws:
TwitterException
twitter4j.internal.org.json.JSONException
Method Detail

init

private void init(twitter4j.internal.org.json.JSONObject json)
           throws TwitterException
Throws:
TwitterException

compareTo

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

getCreatedAt

public java.util.Date getCreatedAt()
Return the created_at

Specified by:
getCreatedAt in interface Status
Returns:
created_at

getId

public long getId()
Returns the id of the status

Specified by:
getId in interface Status
Returns:
the id

getText

public java.lang.String getText()
Returns the text of the status

Specified by:
getText in interface Status
Returns:
the text

getSource

public java.lang.String getSource()
Returns the source

Specified by:
getSource in interface Status
Returns:
the source

isTruncated

public boolean isTruncated()
Test if the status is truncated

Specified by:
isTruncated in interface Status
Returns:
true if truncated

getInReplyToStatusId

public long getInReplyToStatusId()
Returns the in_reply_tostatus_id

Specified by:
getInReplyToStatusId in interface Status
Returns:
the in_reply_tostatus_id

getInReplyToUserId

public int getInReplyToUserId()
Returns the in_reply_user_id

Specified by:
getInReplyToUserId in interface Status
Returns:
the in_reply_tostatus_id

getInReplyToScreenName

public java.lang.String getInReplyToScreenName()
Returns the in_reply_to_screen_name

Specified by:
getInReplyToScreenName in interface Status
Returns:
the in_in_reply_to_screen_name

getGeoLocation

public GeoLocation getGeoLocation()
Returns The location that this tweet refers to if available.

Specified by:
getGeoLocation in interface Status
Returns:
returns The location that this tweet refers to if available (can be null)

getPlace

public Place getPlace()
Returns the place attached to this status

Specified by:
getPlace in interface Status
Returns:
The place attached to this status

getContributors

public java.lang.String[] getContributors()
Returns an array of contributors, or null if no contributor is associated with this status.

Specified by:
getContributors in interface Status

isFavorited

public boolean isFavorited()
Test if the status is favorited

Specified by:
isFavorited in interface Status
Returns:
true if favorited

getUser

public User getUser()
Return the user associated with the status.
This can be null if the instance if from User.getStatus().

Specified by:
getUser in interface Status
Returns:
the user

isRetweet

public boolean isRetweet()

Specified by:
isRetweet in interface Status

getRetweetedStatus

public Status getRetweetedStatus()

Specified by:
getRetweetedStatus in interface Status

createStatusList

static ResponseList<Status> createStatusList(twitter4j.internal.http.HttpResponse res)
                                      throws TwitterException
Throws:
TwitterException

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object