Class SimulatedUser

  • All Implemented Interfaces:
    Serializable, Comparable<twitter4j.User>, twitter4j.TwitterResponse, twitter4j.User

    public class SimulatedUser
    extends AbstractSimulatedTwitterResponse
    implements twitter4j.User
    For simulating tweets without using Twitter.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Id

        protected long m_Id
        the ID.
      • m_Name

        protected String m_Name
        the name of the user.
      • m_ScreenName

        protected String m_ScreenName
        the screen name.
      • m_Description

        protected String m_Description
        the description.
      • m_Lang

        protected String m_Lang
        the language.
      • m_CreatedAt

        protected Date m_CreatedAt
        the created at.
      • m_BiggerProfileImageURL

        protected String m_BiggerProfileImageURL
        the profile image URL.
      • m_BiggerProfileImageURLHttps

        protected String m_BiggerProfileImageURLHttps
        the profile image URL (http).
      • m_DescriptionURLEntities

        protected twitter4j.URLEntity[] m_DescriptionURLEntities
        the description URL entities.
      • m_FavouritesCount

        protected int m_FavouritesCount
        the favorites count.
      • m_FollowersCount

        protected int m_FollowersCount
        the followers count.
      • m_FriendsCount

        protected int m_FriendsCount
        the friends count.
      • m_ListedCount

        protected int m_ListedCount
        the listed count.
      • m_Location

        protected String m_Location
        the location.
      • m_ProfileImageURL

        protected String m_ProfileImageURL
        the profile image URL.
      • m_ProfileImageURLHttps

        protected String m_ProfileImageURLHttps
        the profile image URL (http).
      • m_MiniProfileImageURL

        protected String m_MiniProfileImageURL
        the mini profile image URL.
      • m_MiniProfileImageURLHttps

        protected String m_MiniProfileImageURLHttps
        the mini profile image URL (http).
      • m_OriginalProfileImageURL

        protected String m_OriginalProfileImageURL
        the original profile image URL.
      • m_OriginalProfileImageURLHttps

        protected String m_OriginalProfileImageURLHttps
        the original profile image URL (http).
      • m_ProfileBackgroundColor

        protected String m_ProfileBackgroundColor
        the background color.
      • m_ProfileBackgroundImageURL

        protected String m_ProfileBackgroundImageURL
        the background image URL.
      • m_ProfileBackgroundImageUrlHttps

        protected String m_ProfileBackgroundImageUrlHttps
        the background image URL (http).
      • m_ProfileBannerIPadRetinaURL

        protected String m_ProfileBannerIPadRetinaURL
        the profile banner (IPad retina) URL.
      • m_ProfileBannerIPadURL

        protected String m_ProfileBannerIPadURL
        the profile banner (IPad) URL.
      • m_ProfileBannerMobileRetinaURL

        protected String m_ProfileBannerMobileRetinaURL
        the profile banner (mobile retina) URL.
      • m_ProfileBannerMobileURL

        protected String m_ProfileBannerMobileURL
        the profile banner (mobile) URL.
      • m_ProfileBannerRetinaURL

        protected String m_ProfileBannerRetinaURL
        the profile banner (retina) URL.
      • m_ProfileBannerURL

        protected String m_ProfileBannerURL
        the profile banner URL.
      • m_ProfileLinkColor

        protected String m_ProfileLinkColor
        the profile link color.
      • m_ProfileSidebarBorderColor

        protected String m_ProfileSidebarBorderColor
        the profile sidebar color.
      • m_ProfileSidebarFillColor

        protected String m_ProfileSidebarFillColor
        the profile sidebar fill color.
      • m_ProfileTextColor

        protected String m_ProfileTextColor
        the profile text color.
      • m_Status

        protected twitter4j.Status m_Status
        the status.
      • m_StatusesCount

        protected int m_StatusesCount
        the status count.
      • m_TimeZone

        protected String m_TimeZone
        the timezone.
      • m_UtcOffset

        protected int m_UtcOffset
        the UTC offset.
      • m_URL

        protected String m_URL
        the URL.
      • m_URLEntity

        protected twitter4j.URLEntity m_URLEntity
        the URL entity.
      • m_ContributorsEnabled

        protected boolean m_ContributorsEnabled
        whether contributors are enabled.
      • m_FollowRequestSent

        protected boolean m_FollowRequestSent
        whether follow request sent.
      • m_GeoEnabled

        protected boolean m_GeoEnabled
        whether geolocation is enabled.
      • m_ProfileBackgroundTiled

        protected boolean m_ProfileBackgroundTiled
        whether the profile background is tiled.
      • m_ProfileUseBackgroundImage

        protected boolean m_ProfileUseBackgroundImage
        whether the profile uses background image.
      • m_Protected

        protected boolean m_Protected
        whether the user is protected.
      • m_ShowAllInlineMedia

        protected boolean m_ShowAllInlineMedia
        whether to show all inline media.
      • m_Translator

        protected boolean m_Translator
        whether translator.
      • m_Verified

        protected boolean m_Verified
        whether verified.
      • m_WithheldInCountries

        protected String[] m_WithheldInCountries
        the countries in which withheld.
      • m_DefaultProfileImage

        protected boolean m_DefaultProfileImage
        whether it is the default profile image.
      • m_DefaultProfile

        protected boolean m_DefaultProfile
        whether it is the default profile.
      • m_Email

        protected String m_Email
        the email.
    • Constructor Detail

      • SimulatedUser

        public SimulatedUser()
    • Method Detail

      • compareTo

        public int compareTo​(twitter4j.User o)
        Compares this user with the other one. Uses: getId(), getName()
        Specified by:
        compareTo in interface Comparable<twitter4j.User>
        Parameters:
        o - the user to compare with
        Returns:
        less than 0, equal to 0, greater than 0 if this user is less, equal or larger than the other one
      • setBiggerProfileImageURL

        public void setBiggerProfileImageURL​(String value)
        Sets profile image URL.
        Parameters:
        value - the URL
      • getBiggerProfileImageURL

        public String getBiggerProfileImageURL()
        Returns profile image URL.
        Specified by:
        getBiggerProfileImageURL in interface twitter4j.User
        Returns:
        the URL, null if not set
      • setBiggerProfileImageURLHttps

        public void setBiggerProfileImageURLHttps​(String value)
        Sets the profile image URL (http).
        Parameters:
        value - the URL
      • getBiggerProfileImageURLHttps

        public String getBiggerProfileImageURLHttps()
        Returns the profile image URL (http).
        Specified by:
        getBiggerProfileImageURLHttps in interface twitter4j.User
        Returns:
        the URL, null if not set
      • getCreatedAt

        public void getCreatedAt​(Date value)
        Sets the date user was created.
        Parameters:
        value - the date
      • getCreatedAt

        public Date getCreatedAt()
        Returns the date user was created.
        Specified by:
        getCreatedAt in interface twitter4j.User
        Returns:
        the date, null if not set
      • setDescription

        public void setDescription​(String value)
        Sets the user description.
        Parameters:
        value - the description
      • getDescription

        public String getDescription()
        Returns the user description.
        Specified by:
        getDescription in interface twitter4j.User
        Returns:
        the description
      • getDescriptionURLEntities

        public twitter4j.URLEntity[] getDescriptionURLEntities()
        Returns the URLs in the description.
        Specified by:
        getDescriptionURLEntities in interface twitter4j.User
        Returns:
        the URLs
      • setFavouritesCount

        public void setFavouritesCount​(int value)
        Sets the favorites count.
        Parameters:
        value - the count
      • getFavouritesCount

        public int getFavouritesCount()
        Returns the favorites count.
        Specified by:
        getFavouritesCount in interface twitter4j.User
        Returns:
        the count
      • setFollowersCount

        public void setFollowersCount​(int value)
        Sets the followers count.
        Parameters:
        value - the count
      • getFollowersCount

        public int getFollowersCount()
        Returns the followers count.
        Specified by:
        getFollowersCount in interface twitter4j.User
        Returns:
        the count
      • setFriendsCount

        public void setFriendsCount​(int value)
        Sets the friends count.
        Parameters:
        value - the count
      • getFriendsCount

        public int getFriendsCount()
        Returns the friends count.
        Specified by:
        getFriendsCount in interface twitter4j.User
        Returns:
        the count
      • setId

        public void setId​(long value)
        Sets the ID of the user.
        Parameters:
        value - the ID
      • getId

        public long getId()
        Returns the ID of the user.
        Specified by:
        getId in interface twitter4j.User
        Returns:
        the ID
      • setLang

        public void setLang​(String value)
        Sets the language of the user.
        Parameters:
        value - the language
      • getLang

        public String getLang()
        Returns the language of the user.
        Specified by:
        getLang in interface twitter4j.User
        Returns:
        the language
      • setListedCount

        public void setListedCount​(int value)
        Sets the listed count.
        Parameters:
        value - the count
      • getListedCount

        public int getListedCount()
        Return the listed count.
        Specified by:
        getListedCount in interface twitter4j.User
        Returns:
        the count
      • setLocation

        public void setLocation​(String value)
        Sets the location.
        Parameters:
        value - the location
      • getLocation

        public String getLocation()
        Returns the location.
        Specified by:
        getLocation in interface twitter4j.User
        Returns:
        the location
      • setMiniProfileImageURL

        public void setMiniProfileImageURL​(String value)
        Sets the URL of the mini profile image.
        Parameters:
        value - the URL
      • getMiniProfileImageURL

        public String getMiniProfileImageURL()
        Returns the URL of the mini profile image.
        Specified by:
        getMiniProfileImageURL in interface twitter4j.User
        Returns:
        the URL
      • setMiniProfileImageURLHttps

        public void setMiniProfileImageURLHttps​(String value)
        Sets the URL of the mini profile image (http).
      • getMiniProfileImageURLHttps

        public String getMiniProfileImageURLHttps()
        Returns the URL of the mini profile image (http).
        Specified by:
        getMiniProfileImageURLHttps in interface twitter4j.User
        Returns:
        the URL
      • getName

        public String getName()
        Returns the name of the user.
        Specified by:
        getName in interface twitter4j.User
        Returns:
        the name
      • setName

        public void setName​(String value)
        Sets the name of the user.
        Parameters:
        value - the name
      • getEmail

        public String getEmail()
        Returns the email of the user.
        Specified by:
        getEmail in interface twitter4j.User
        Returns:
        the email
      • setEmail

        public void setEmail​(String value)
        Sets the email.
        Parameters:
        value - the email
      • getOriginalProfileImageURL

        public String getOriginalProfileImageURL()
        Returns the URL of the original profile image.
        Specified by:
        getOriginalProfileImageURL in interface twitter4j.User
        Returns:
        the URL
      • setOriginalProfileImageURL

        public void setOriginalProfileImageURL​(String value)
        Sets the URL of the original profile image.
        Parameters:
        value - the URL
      • setOriginalProfileImageURLHttps

        public void setOriginalProfileImageURLHttps​(String value)
        Sets the URL of the original profile image (http).
        Parameters:
        value - the URL
      • getOriginalProfileImageURLHttps

        public String getOriginalProfileImageURLHttps()
        Returns the URL of the original profile image (http).
        Specified by:
        getOriginalProfileImageURLHttps in interface twitter4j.User
        Returns:
        the URL
      • setDefaultProfileImage

        public void setDefaultProfileImage​(boolean value)
        Sets if the user has not uploaded their own avatar
        Parameters:
        value - true if the user has not uploaded their own avatar
      • isDefaultProfileImage

        public boolean isDefaultProfileImage()
        Tests if the user has not uploaded their own avatar
        Specified by:
        isDefaultProfileImage in interface twitter4j.User
        Returns:
        if the user has not uploaded their own avatar
      • setProfileBackgroundColor

        public void setProfileBackgroundColor​(String value)
        Sets the profile background color.
        Parameters:
        value - the color
      • getProfileBackgroundColor

        public String getProfileBackgroundColor()
        Returns the profile background color.
        Specified by:
        getProfileBackgroundColor in interface twitter4j.User
        Returns:
        the color
      • setProfileBackgroundImageURL

        public void setProfileBackgroundImageURL​(String value)
        Sets the URL of the background image.
        Parameters:
        value - the URL
      • getProfileBackgroundImageURL

        public String getProfileBackgroundImageURL()
        Returns the URL of the background image.
        Specified by:
        getProfileBackgroundImageURL in interface twitter4j.User
        Returns:
        the URL
      • setProfileBackgroundImageUrlHttps

        public void setProfileBackgroundImageUrlHttps​(String value)
        Sets the background image URL (http).
        Parameters:
        value - the URL
      • getProfileBackgroundImageUrlHttps

        public String getProfileBackgroundImageUrlHttps()
        Returns the background image URL (http).
        Specified by:
        getProfileBackgroundImageUrlHttps in interface twitter4j.User
        Returns:
        the URL
      • setProfileBannerIPadRetinaURL

        public void setProfileBannerIPadRetinaURL​(String value)
        Sets the IPad retina profile banner URL.
        Parameters:
        value - the URL
      • getProfileBannerIPadRetinaURL

        public String getProfileBannerIPadRetinaURL()
        Returns the IPad retina profile banner URL.
        Specified by:
        getProfileBannerIPadRetinaURL in interface twitter4j.User
        Returns:
        the URL
      • setProfileBannerIPadURL

        public void setProfileBannerIPadURL​(String value)
        Sets the IPad profile banner URL.
        Parameters:
        value - the URL
      • getProfileBannerIPadURL

        public String getProfileBannerIPadURL()
        Returns the IPad profile banner URL.
        Specified by:
        getProfileBannerIPadURL in interface twitter4j.User
        Returns:
        the URL
      • setProfileBannerMobileRetinaURL

        public void setProfileBannerMobileRetinaURL​(String value)
        Sets the profile banner (mobile retina) URL.
        Parameters:
        value - the URL
      • getProfileBannerMobileRetinaURL

        public String getProfileBannerMobileRetinaURL()
        Returns the profile banner (mobile retina) URL.
        Specified by:
        getProfileBannerMobileRetinaURL in interface twitter4j.User
        Returns:
        the URL
      • setProfileBannerMobileURL

        public void setProfileBannerMobileURL​(String value)
        Sets the profile banner (mobile) URL.
        Parameters:
        value - the URL
      • getProfileBannerMobileURL

        public String getProfileBannerMobileURL()
        Returns the profile banner (mobile) URL.
        Specified by:
        getProfileBannerMobileURL in interface twitter4j.User
        Returns:
        the URL
      • setProfileBannerRetinaURL

        public void setProfileBannerRetinaURL​(String value)
        Sets the profile banner (retina) URL.
        Parameters:
        value - the URL
      • getProfileBannerRetinaURL

        public String getProfileBannerRetinaURL()
        Returns the profile banner (retina) URL.
        Specified by:
        getProfileBannerRetinaURL in interface twitter4j.User
        Returns:
        the URL
      • setProfileBannerURL

        public void setProfileBannerURL​(String value)
        Sets the profile banner URL.
        Parameters:
        value - the URL
      • getProfileBannerURL

        public String getProfileBannerURL()
        Returns the profile banner URL.
        Specified by:
        getProfileBannerURL in interface twitter4j.User
        Returns:
        the URL
      • setProfileImageURL

        public void setProfileImageURL​(String value)
        Sets the profile image URL.
        Parameters:
        value - the URL
      • getProfileImageURL

        public String getProfileImageURL()
        Returns the profile image URL.
        Specified by:
        getProfileImageURL in interface twitter4j.User
        Returns:
        the URL
      • getProfileImageURLHttps

        public String getProfileImageURLHttps()
        Returns the profile image URL (http).
        Specified by:
        getProfileImageURLHttps in interface twitter4j.User
        Returns:
        the URL
      • setProfileLinkColor

        public void setProfileLinkColor​(String value)
        Sets the profile link color.
        Parameters:
        value - the color
      • getProfileLinkColor

        public String getProfileLinkColor()
        Returns the profile link color.
        Specified by:
        getProfileLinkColor in interface twitter4j.User
        Returns:
        the color
      • setProfileSidebarBorderColor

        public void setProfileSidebarBorderColor​(String value)
        Sets the profile sidebar color.
        Parameters:
        value - the color
      • getProfileSidebarBorderColor

        public String getProfileSidebarBorderColor()
        Returns the profile sidebar color.
        Specified by:
        getProfileSidebarBorderColor in interface twitter4j.User
        Returns:
        the color
      • setProfileSidebarFillColor

        public void setProfileSidebarFillColor​(String value)
        Sets the sidebar fill color.
        Parameters:
        value - the color
      • getProfileSidebarFillColor

        public String getProfileSidebarFillColor()
        Returns the sidebar fill color.
        Specified by:
        getProfileSidebarFillColor in interface twitter4j.User
        Returns:
        the color
      • setProfileTextColor

        public void setProfileTextColor​(String value)
        Sets the profile text color.
        Parameters:
        value - the color
      • getProfileTextColor

        public String getProfileTextColor()
        Returns the profile text color.
        Specified by:
        getProfileTextColor in interface twitter4j.User
        Returns:
        the color
      • setScreenName

        public void setScreenName​(String value)
        Sets the screen name.
        Parameters:
        value - the screen name
      • getScreenName

        public String getScreenName()
        Returns the screen name.
        Specified by:
        getScreenName in interface twitter4j.User
        Returns:
        the screen name
      • setStatus

        public void setStatus​(twitter4j.Status value)
        Sets the status.
        Parameters:
        value - the status
      • getStatus

        public twitter4j.Status getStatus()
        Returns the status.
        Specified by:
        getStatus in interface twitter4j.User
        Returns:
        the status
      • setStatusesCount

        public void setStatusesCount​(int value)
        Sets the status count.
        Parameters:
        value - the count
      • getStatusesCount

        public int getStatusesCount()
        Return the status count.
        Specified by:
        getStatusesCount in interface twitter4j.User
        Returns:
        the count
      • setTimeZone

        public void setTimeZone​(String value)
        Sets the timezone.
        Parameters:
        value - the timezone
      • getTimeZone

        public String getTimeZone()
        Returns the timezone.
        Specified by:
        getTimeZone in interface twitter4j.User
        Returns:
        the timezone
      • setURL

        public void setURL​(String value)
        Sets the URL.
        Parameters:
        value - the URL
      • getURL

        public String getURL()
        Returns the URL.
        Specified by:
        getURL in interface twitter4j.User
        Returns:
        the URL
      • setURLEntity

        public void setURLEntity​(twitter4j.URLEntity value)
        Sets the URL entity.
        Parameters:
        value - the entity
      • getURLEntity

        public twitter4j.URLEntity getURLEntity()
        Returns the URL entity.
        Specified by:
        getURLEntity in interface twitter4j.User
        Returns:
        the entity
      • setWithheldInCountries

        public void setWithheldInCountries​(String[] value)
        Sets the list of country codes where the user is withheld
        Parameters:
        value - list of country codes where the tweet is withheld - null if not withheld
      • getWithheldInCountries

        public String[] getWithheldInCountries()
        Returns the list of country codes where the user is withheld
        Specified by:
        getWithheldInCountries in interface twitter4j.User
        Returns:
        list of country codes where the tweet is withheld - null if not withheld
      • setUtcOffset

        public void setUtcOffset​(int value)
        Sets the UTC offset.
        Parameters:
        value - the offset
      • getUtcOffset

        public int getUtcOffset()
        Returns the UTC offset.
        Specified by:
        getUtcOffset in interface twitter4j.User
        Returns:
        the offset
      • setContributorsEnabled

        public void setContributorsEnabled​(boolean value)
        Sets whether contributors are enabled.
        Parameters:
        value - true if enabled
      • isContributorsEnabled

        public boolean isContributorsEnabled()
        Returns whether contributors are enabled.
        Specified by:
        isContributorsEnabled in interface twitter4j.User
        Returns:
        true if enabled
      • setFollowRequestSent

        public void setFollowRequestSent​(boolean value)
        Sets whether follow request was sent.
        Parameters:
        value - true if sent
      • isFollowRequestSent

        public boolean isFollowRequestSent()
        Returns whether follow request was sent.
        Specified by:
        isFollowRequestSent in interface twitter4j.User
        Returns:
        true if sent
      • setGeoEnabled

        public void setGeoEnabled​(boolean value)
        Sets whether geolocation is enabled.
        Parameters:
        value - true if enabled
      • isGeoEnabled

        public boolean isGeoEnabled()
        Returns whether geolocation is enabled.
        Specified by:
        isGeoEnabled in interface twitter4j.User
        Returns:
        true if enabled
      • setProfileBackgroundTiled

        public void setProfileBackgroundTiled​(boolean value)
        Sets whether the profile background is tiled.
        Parameters:
        value - true if tiled
      • isProfileBackgroundTiled

        public boolean isProfileBackgroundTiled()
        Returns whether the profile background is tiled.
        Specified by:
        isProfileBackgroundTiled in interface twitter4j.User
        Returns:
        true if tiled
      • setProfileUseBackgroundImage

        public void setProfileUseBackgroundImage​(boolean value)
        Sets whether the profile uses a background image.
        Parameters:
        value - true if image in use
      • isProfileUseBackgroundImage

        public boolean isProfileUseBackgroundImage()
        Returns whether the profile uses a background image.
        Specified by:
        isProfileUseBackgroundImage in interface twitter4j.User
        Returns:
        true if image in use
      • setDefaultProfile

        public void setDefaultProfile​(boolean value)
        Sets if the user has not altered the theme or background
        Parameters:
        value - true if the user has not altered the theme or background
      • isDefaultProfile

        public boolean isDefaultProfile()
        Tests if the user has not altered the theme or background
        Specified by:
        isDefaultProfile in interface twitter4j.User
        Returns:
        if the user has not altered the theme or background
      • setProtected

        public void setProtected​(boolean value)
        Sets whether the user is protected.
        Parameters:
        value - true if protected
      • isProtected

        public boolean isProtected()
        Returns whether the user is protected.
        Specified by:
        isProtected in interface twitter4j.User
        Returns:
        true if protected
      • setShowAllInlineMedia

        public void setShowAllInlineMedia​(boolean value)
        Sets whether all inline media is shown.
        Parameters:
        value - true if shown
      • isShowAllInlineMedia

        public boolean isShowAllInlineMedia()
        Returns whether all inline media is shown.
        Specified by:
        isShowAllInlineMedia in interface twitter4j.User
        Returns:
        true if shown
      • setTranslator

        public void setTranslator​(boolean value)
        Sets whether translator.
        Parameters:
        value - true if translator
      • isTranslator

        public boolean isTranslator()
        Returns whether translator.
        Specified by:
        isTranslator in interface twitter4j.User
        Returns:
        true if translator
      • isVerified

        public boolean isVerified()
        Returns whether user is verified.
        Specified by:
        isVerified in interface twitter4j.User
        Returns:
        true if verified
      • toString

        public String toString()
        Returns ID and name of user.
        Overrides:
        toString in class Object
        Returns:
        ID and name