Package twitter4j.v1

Interface URLEntity

All Superinterfaces:
Serializable, TweetEntity
All Known Subinterfaces:
MediaEntity

public interface URLEntity extends TweetEntity, Serializable
A data interface representing one single URL entity.
Since:
Twitter4J 2.1.9
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the display URL if mentioned URL is shorten.
    int
    Returns the index of the end character of the URL mentioned in the tweet.
    Returns the expanded URL if mentioned URL is shorten.
    int
    Returns the index of the start character of the URL mentioned in the tweet.
    Returns the URL mentioned in the tweet.
    This method implementation is to meet TweetEntity interface and the behavior is equivalent to getURL()
    Returns the URL mentioned in the tweet.
  • Method Details

    • getText

      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 TweetEntity
      Returns:
      the mentioned URL
    • getURL

      String getURL()
      Returns the URL mentioned in the tweet.
      Returns:
      the mentioned URL
    • getExpandedURL

      String getExpandedURL()
      Returns the expanded URL if mentioned URL is shorten.
      Returns:
      the expanded URL if mentioned URL is shorten, or null if no shorten URL was mentioned.
    • getDisplayURL

      String getDisplayURL()
      Returns the display URL if mentioned URL is shorten.
      Returns:
      the display URL if mentioned URL is shorten, or null if no shorten URL was mentioned.
    • getStart

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

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