twitter4j
Class StatusJSONImpl

java.lang.Object
  extended by twitter4j.TwitterResponseImpl
      extended by twitter4j.StatusJSONImpl
All Implemented Interfaces:
java.io.Serializable, 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.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  Status retweetedStatus
           
private static long serialVersionUID
           
private  java.lang.String source
           
private  java.lang.String text
           
private  User user
           
 
Constructor Summary
StatusJSONImpl(HttpResponse res)
           
StatusJSONImpl(twitter4j.org.json.JSONObject json)
           
 
Method Summary
(package private) static ResponseList<Status> createStatusList(HttpResponse res)
           
 boolean equals(java.lang.Object obj)
           
 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
 Status getRetweetedStatus()
           
 java.lang.String getSource()
          Returns the source
 java.lang.String getText()
          Returns the text of the status
 User getUser()
          Return the user
 int hashCode()
           
private  void init(twitter4j.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, setRateLimitStatus
 
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

retweetedStatus

private Status retweetedStatus

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

user

private User user
Constructor Detail

StatusJSONImpl

StatusJSONImpl(HttpResponse res)
         throws TwitterException
Throws:
TwitterException

StatusJSONImpl

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

init

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

getCreatedAt

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

Specified by:
getCreatedAt in interface Status
Returns:
created_at
Since:
Twitter4J 1.1.0

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
Since:
Twitter4J 1.0.4

isTruncated

public boolean isTruncated()
Test if the status is truncated

Specified by:
isTruncated in interface Status
Returns:
true if truncated
Since:
Twitter4J 1.0.4

getInReplyToStatusId

public long getInReplyToStatusId()
Returns the in_reply_tostatus_id

Specified by:
getInReplyToStatusId in interface Status
Returns:
the in_reply_tostatus_id
Since:
Twitter4J 1.0.4

getInReplyToUserId

public int getInReplyToUserId()
Returns the in_reply_user_id

Specified by:
getInReplyToUserId in interface Status
Returns:
the in_reply_tostatus_id
Since:
Twitter4J 1.0.4

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
Since:
Twitter4J 2.0.4

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)
Since:
Twitter4J 2.1.0

isFavorited

public boolean isFavorited()
Test if the status is favorited

Specified by:
isFavorited in interface Status
Returns:
true if favorited
Since:
Twitter4J 1.0.4

getUser

public User getUser()
Return the user

Specified by:
getUser in interface Status
Returns:
the user

isRetweet

public boolean isRetweet()
Specified by:
isRetweet in interface Status
Since:
Twitter4J 2.0.10

getRetweetedStatus

public Status getRetweetedStatus()
Specified by:
getRetweetedStatus in interface Status
Since:
Twitter4J 2.1.0

createStatusList

static ResponseList<Status> createStatusList(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