twitter4j
Class URLEntityJSONImpl

java.lang.Object
  extended by twitter4j.URLEntityJSONImpl
All Implemented Interfaces:
java.io.Serializable, URLEntity

final class URLEntityJSONImpl
extends java.lang.Object
implements URLEntity

A data class representing one single URL entity.

Since:
Twitter4J 2.1.9
Author:
Mocel - mocel at guma.jp

Field Summary
private  java.lang.String displayURL
           
private  int end
           
private  java.net.URL expandedURL
           
private static long serialVersionUID
           
private  int start
           
private  java.net.URL url
           
 
Constructor Summary
URLEntityJSONImpl(twitter4j.internal.org.json.JSONObject json)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getDisplayURL()
          Returns the display URL if mentioned URL is shorten.
 int getEnd()
          Returns the index of the end character of the URL mentioned in the tweet.
 java.net.URL getExpandedURL()
          Returns the expanded URL if mentioned URL is shorten.
 int getStart()
          Returns the index of the start character of the URL mentioned in the tweet.
 java.net.URL getURL()
          Returns the URL mentioned in the tweet.
 int hashCode()
           
private  void init(twitter4j.internal.org.json.JSONObject json)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

start

private int start

end

private int end

url

private java.net.URL url

expandedURL

private java.net.URL expandedURL

displayURL

private java.lang.String displayURL

serialVersionUID

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

URLEntityJSONImpl

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

init

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

getURL

public java.net.URL getURL()
Returns the URL mentioned in the tweet.

Specified by:
getURL in interface URLEntity
Returns:
the mentioned URL

getExpandedURL

public java.net.URL getExpandedURL()
Returns the expanded URL if mentioned URL is shorten.

Specified by:
getExpandedURL in interface URLEntity
Returns:
the expanded URL if mentioned URL is shorten, or null if no shorten URL was mentioned.

getDisplayURL

public java.lang.String getDisplayURL()
Returns the display URL if mentioned URL is shorten.

Specified by:
getDisplayURL in interface URLEntity
Returns:
the display URL if mentioned URL is shorten, or null if no shorten URL was mentioned.

getStart

public int getStart()
Returns the index of the start character of the URL mentioned in the tweet.

Specified by:
getStart in interface URLEntity
Returns:
the index of the start 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 URLEntity
Returns:
the index of the end character of the URL mentioned in the tweet

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object