Class SimulatedURLEntity

  • All Implemented Interfaces:
    Serializable, twitter4j.TweetEntity, twitter4j.URLEntity

    public class SimulatedURLEntity
    extends Object
    implements twitter4j.URLEntity, Serializable
    Encapsulates a URL entity for simulating tweets.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_URL

        protected String m_URL
        the URL.
      • m_ExpandedURL

        protected String m_ExpandedURL
        the expaneded URL.
      • m_DisplayURL

        protected String m_DisplayURL
        the display URL.
      • m_Start

        protected int m_Start
        the start index in the tweet.
      • m_End

        protected int m_End
        the end index in the tweet.
    • Constructor Detail

      • SimulatedURLEntity

        public SimulatedURLEntity()
        Initializes the entity.
      • SimulatedURLEntity

        public SimulatedURLEntity​(String url)
        Initializes the entity.
        Parameters:
        url - the URL to be used for all URLs
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
      • setURL

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

        public String getURL()
        Returns the URL mentioned in the tweet.
        Specified by:
        getURL in interface twitter4j.URLEntity
        Returns:
        the mentioned URL
      • setExpandedURL

        public void setExpandedURL​(String value)
        Sets the expanded URL.
        Parameters:
        value - the expanded URL
      • getExpandedURL

        public String getExpandedURL()
        Returns the expanded URL.
        Specified by:
        getExpandedURL in interface twitter4j.URLEntity
        Returns:
        the expanded URL
      • setDisplayURL

        public void setDisplayURL​(String value)
        Sets the display URL if mentioned URL is shorten.
        Parameters:
        value - the display URL if mentioned URL is shorten, or null if no shorten URL was mentioned.
      • getDisplayURL

        public String getDisplayURL()
        Returns the display URL if mentioned URL is shorten.
        Specified by:
        getDisplayURL in interface twitter4j.URLEntity
        Returns:
        the display URL if mentioned URL is shorten, or null if no shorten URL was mentioned.
      • setStart

        public void setStart​(int value)
        Sets the index of the start character of the URL mentioned in the tweet.
        Parameters:
        value - the index of the start character of the URL mentioned in the tweet
      • getStart

        public int getStart()
        Returns the index of the start character of the URL mentioned in the tweet.
        Specified by:
        getStart in interface twitter4j.TweetEntity
        Specified by:
        getStart in interface twitter4j.URLEntity
        Returns:
        the index of the start character of the URL mentioned in the tweet
      • setEnd

        public void setEnd​(int value)
        Sets the index of the end character of the URL mentioned in the tweet.
        Parameters:
        value - the index of the end character of the URL mentioned in the tweet
      • getEnd

        public int getEnd()
        Returns the index of the end character of the URL mentioned in the tweet.
        Specified by:
        getEnd in interface twitter4j.TweetEntity
        Specified by:
        getEnd in interface twitter4j.URLEntity
        Returns:
        the index of the end character of the URL mentioned in the tweet
      • getText

        public String getText()
        Returns the URL mentioned in the tweet.
        This method implementation is to meet TweetEntity interface and the behavior is equivalent to getURL()
        Specified by:
        getText in interface twitter4j.TweetEntity
        Specified by:
        getText in interface twitter4j.URLEntity
        Returns:
        the mentioned URL
        See Also:
        getURL()