twitter4j
Class UserJSONImpl

java.lang.Object
  extended by twitter4j.TwitterResponseImpl
      extended by twitter4j.UserJSONImpl
All Implemented Interfaces:
java.io.Serializable, TwitterResponse, User

 class UserJSONImpl
extends TwitterResponseImpl
implements User, java.io.Serializable

A data class representing Basic user information element

Author:
Yusuke Yamamoto - yusuke at mac.com
See Also:
REST API Documentation - Basic user information element

Field Summary
private  java.util.Date createdAt
           
private  java.lang.String description
           
private  int favouritesCount
           
private  int followersCount
           
private  int friendsCount
           
private  int id
           
private  boolean isGeoEnabled
           
private  boolean isProtected
           
private  boolean isVerified
           
private  java.lang.String location
           
private  java.lang.String name
           
private  java.lang.String profileBackgroundColor
           
private  java.lang.String profileBackgroundImageUrl
           
private  boolean profileBackgroundTiled
           
private  java.lang.String profileImageUrl
           
private  java.lang.String profileLinkColor
           
private  java.lang.String profileSidebarBorderColor
           
private  java.lang.String profileSidebarFillColor
           
private  java.lang.String profileTextColor
           
private  java.lang.String screenName
           
private static long serialVersionUID
           
private  java.util.Date statusCreatedAt
           
private  int statusesCount
           
private  boolean statusFavorited
           
private  long statusId
           
private  java.lang.String statusInReplyToScreenName
           
private  long statusInReplyToStatusId
           
private  int statusInReplyToUserId
           
private  java.lang.String statusSource
           
private  java.lang.String statusText
           
private  boolean statusTruncated
           
private  java.lang.String timeZone
           
private  java.lang.String url
           
private  int utcOffset
           
 
Constructor Summary
UserJSONImpl(HttpResponse res)
           
UserJSONImpl(twitter4j.org.json.JSONObject json)
           
 
Method Summary
(package private) static PagableResponseList<User> createPagableUserList(HttpResponse res)
           
(package private) static ResponseList<User> createUserList(HttpResponse res)
           
 boolean equals(java.lang.Object obj)
           
 java.util.Date getCreatedAt()
          
 java.lang.String getDescription()
          Returns the description of the user
 int getFavouritesCount()
          
 int getFollowersCount()
          Returns the number of followers
 int getFriendsCount()
          
 int getId()
          Returns the id of the user
 java.lang.String getLocation()
          Returns the location of the user
 java.lang.String getName()
          Returns the name of the user
 java.lang.String getProfileBackgroundColor()
          
 java.lang.String getProfileBackgroundImageUrl()
          
 java.net.URL getProfileImageURL()
          Returns the profile image url of the user
 java.lang.String getProfileLinkColor()
          
 java.lang.String getProfileSidebarBorderColor()
          
 java.lang.String getProfileSidebarFillColor()
          
 java.lang.String getProfileTextColor()
           
 java.lang.String getScreenName()
          Returns the screen name of the user
 java.util.Date getStatusCreatedAt()
          
 int getStatusesCount()
          
 long getStatusId()
          
 java.lang.String getStatusInReplyToScreenName()
          
 long getStatusInReplyToStatusId()
          
 int getStatusInReplyToUserId()
          
 java.lang.String getStatusSource()
          
 java.lang.String getStatusText()
          
 java.lang.String getTimeZone()
          
 java.net.URL getURL()
          Returns the url of the user
 int getUtcOffset()
          
 int hashCode()
           
private  void init(twitter4j.org.json.JSONObject json)
           
 boolean isGeoEnabled()
          
 boolean isProfileBackgroundTiled()
          
 boolean isProtected()
          Test if the user status is protected
 boolean isStatusFavorited()
          
 boolean isStatusTruncated()
          
 boolean isVerified()
          
 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

id

private int id

name

private java.lang.String name

screenName

private java.lang.String screenName

location

private java.lang.String location

description

private java.lang.String description

profileImageUrl

private java.lang.String profileImageUrl

url

private java.lang.String url

isProtected

private boolean isProtected

followersCount

private int followersCount

statusCreatedAt

private java.util.Date statusCreatedAt

statusId

private long statusId

statusText

private java.lang.String statusText

statusSource

private java.lang.String statusSource

statusTruncated

private boolean statusTruncated

statusInReplyToStatusId

private long statusInReplyToStatusId

statusInReplyToUserId

private int statusInReplyToUserId

statusFavorited

private boolean statusFavorited

statusInReplyToScreenName

private java.lang.String statusInReplyToScreenName

profileBackgroundColor

private java.lang.String profileBackgroundColor

profileTextColor

private java.lang.String profileTextColor

profileLinkColor

private java.lang.String profileLinkColor

profileSidebarFillColor

private java.lang.String profileSidebarFillColor

profileSidebarBorderColor

private java.lang.String profileSidebarBorderColor

friendsCount

private int friendsCount

createdAt

private java.util.Date createdAt

favouritesCount

private int favouritesCount

utcOffset

private int utcOffset

timeZone

private java.lang.String timeZone

profileBackgroundImageUrl

private java.lang.String profileBackgroundImageUrl

profileBackgroundTiled

private boolean profileBackgroundTiled

statusesCount

private int statusesCount

isGeoEnabled

private boolean isGeoEnabled

isVerified

private boolean isVerified

serialVersionUID

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

UserJSONImpl

UserJSONImpl(HttpResponse res)
       throws TwitterException
Throws:
TwitterException

UserJSONImpl

UserJSONImpl(twitter4j.org.json.JSONObject json)
       throws TwitterException
Throws:
TwitterException
Method Detail

init

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

getId

public int getId()
Returns the id of the user

Specified by:
getId in interface User
Returns:
the id of the user

getName

public java.lang.String getName()
Returns the name of the user

Specified by:
getName in interface User
Returns:
the name of the user

getScreenName

public java.lang.String getScreenName()
Returns the screen name of the user

Specified by:
getScreenName in interface User
Returns:
the screen name of the user

getLocation

public java.lang.String getLocation()
Returns the location of the user

Specified by:
getLocation in interface User
Returns:
the location of the user

getDescription

public java.lang.String getDescription()
Returns the description of the user

Specified by:
getDescription in interface User
Returns:
the description of the user

getProfileImageURL

public java.net.URL getProfileImageURL()
Returns the profile image url of the user

Specified by:
getProfileImageURL in interface User
Returns:
the profile image url of the user

getURL

public java.net.URL getURL()
Returns the url of the user

Specified by:
getURL in interface User
Returns:
the url of the user

isProtected

public boolean isProtected()
Test if the user status is protected

Specified by:
isProtected in interface User
Returns:
true if the user status is protected

getFollowersCount

public int getFollowersCount()
Returns the number of followers

Specified by:
getFollowersCount in interface User
Returns:
the number of followers

getStatusCreatedAt

public java.util.Date getStatusCreatedAt()

Specified by:
getStatusCreatedAt in interface User
Returns:
created_at or null if the user is protected

getStatusId

public long getStatusId()

Specified by:
getStatusId in interface User
Returns:
status id or -1 if the user is protected

getStatusText

public java.lang.String getStatusText()

Specified by:
getStatusText in interface User
Returns:
status text or null if the user is protected

getStatusSource

public java.lang.String getStatusSource()

Specified by:
getStatusSource in interface User
Returns:
source or null if the user is protected

isStatusTruncated

public boolean isStatusTruncated()

Specified by:
isStatusTruncated in interface User
Returns:
truncated or false if the user is protected

getStatusInReplyToStatusId

public long getStatusInReplyToStatusId()

Specified by:
getStatusInReplyToStatusId in interface User
Returns:
in_reply_to_status_id or -1 if the user is protected

getStatusInReplyToUserId

public int getStatusInReplyToUserId()

Specified by:
getStatusInReplyToUserId in interface User
Returns:
in_reply_to_user_id or -1 if the user is protected

isStatusFavorited

public boolean isStatusFavorited()

Specified by:
isStatusFavorited in interface User
Returns:
favorited or false if the user is protected

getStatusInReplyToScreenName

public java.lang.String getStatusInReplyToScreenName()

Specified by:
getStatusInReplyToScreenName in interface User
Returns:
in_reply_to_screen_name or null if the user is protected

getProfileBackgroundColor

public java.lang.String getProfileBackgroundColor()

Specified by:
getProfileBackgroundColor in interface User

getProfileTextColor

public java.lang.String getProfileTextColor()
Specified by:
getProfileTextColor in interface User

getProfileLinkColor

public java.lang.String getProfileLinkColor()

Specified by:
getProfileLinkColor in interface User

getProfileSidebarFillColor

public java.lang.String getProfileSidebarFillColor()

Specified by:
getProfileSidebarFillColor in interface User

getProfileSidebarBorderColor

public java.lang.String getProfileSidebarBorderColor()

Specified by:
getProfileSidebarBorderColor in interface User

getFriendsCount

public int getFriendsCount()

Specified by:
getFriendsCount in interface User

getCreatedAt

public java.util.Date getCreatedAt()

Specified by:
getCreatedAt in interface User

getFavouritesCount

public int getFavouritesCount()

Specified by:
getFavouritesCount in interface User

getUtcOffset

public int getUtcOffset()

Specified by:
getUtcOffset in interface User

getTimeZone

public java.lang.String getTimeZone()

Specified by:
getTimeZone in interface User

getProfileBackgroundImageUrl

public java.lang.String getProfileBackgroundImageUrl()

Specified by:
getProfileBackgroundImageUrl in interface User

isProfileBackgroundTiled

public boolean isProfileBackgroundTiled()

Specified by:
isProfileBackgroundTiled in interface User

getStatusesCount

public int getStatusesCount()

Specified by:
getStatusesCount in interface User

isGeoEnabled

public boolean isGeoEnabled()

Specified by:
isGeoEnabled in interface User
Returns:
the user is enabling geo location

isVerified

public boolean isVerified()

Specified by:
isVerified in interface User
Returns:
returns true if the user is a verified celebrity

createPagableUserList

static PagableResponseList<User> createPagableUserList(HttpResponse res)
                                                throws TwitterException
Throws:
TwitterException

createUserList

static ResponseList<User> createUserList(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