public class MediaEntityJSONImpl extends EntityIndex implements MediaEntity
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
MediaEntityJSONImpl.Size |
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
displayURL |
private java.lang.String |
expandedURL |
private long |
id |
private java.lang.String |
mediaURL |
private java.lang.String |
mediaURLHttps |
private static long |
serialVersionUID |
private java.util.Map<java.lang.Integer,MediaEntity.Size> |
sizes |
private java.lang.String |
type |
private java.lang.String |
url |
| Constructor and Description |
|---|
MediaEntityJSONImpl() |
MediaEntityJSONImpl(JSONObject json) |
| Modifier and Type | Method and Description |
|---|---|
private void |
addMediaEntitySizeIfNotNull(java.util.Map<java.lang.Integer,MediaEntity.Size> sizes,
JSONObject sizesJSON,
java.lang.Integer size,
java.lang.String key) |
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.lang.String |
getExpandedURL()
Returns the expanded URL if mentioned URL is shorten.
|
long |
getId()
Returns the id of the media.
|
java.lang.String |
getMediaURL()
Returns the media URL.
|
java.lang.String |
getMediaURLHttps()
Returns the media secure URL.
|
java.util.Map<java.lang.Integer,MediaEntity.Size> |
getSizes()
Returns size variations of the media.
|
int |
getStart()
Returns the index of the start character of the URL mentioned in the tweet.
|
java.lang.String |
getText()
Returns the URL mentioned in the tweet.
This method implementation is to meet TweetEntity interface and the behavior is equivalent to URLEntity.getURL() |
java.lang.String |
getType()
Returns the media type ("photo").
|
java.lang.String |
getURL()
Returns the URL mentioned in the tweet.
|
int |
hashCode() |
java.lang.String |
toString() |
compareTo, setEnd, setStartprivate static final long serialVersionUID
private long id
private java.lang.String url
private java.lang.String mediaURL
private java.lang.String mediaURLHttps
private java.lang.String expandedURL
private java.lang.String displayURL
private java.util.Map<java.lang.Integer,MediaEntity.Size> sizes
private java.lang.String type
MediaEntityJSONImpl(JSONObject json) throws TwitterException
TwitterExceptionMediaEntityJSONImpl()
private void addMediaEntitySizeIfNotNull(java.util.Map<java.lang.Integer,MediaEntity.Size> sizes, JSONObject sizesJSON, java.lang.Integer size, java.lang.String key) throws JSONException
JSONExceptionpublic long getId()
getId in interface MediaEntitypublic java.lang.String getMediaURL()
getMediaURL in interface MediaEntitypublic java.lang.String getMediaURLHttps()
getMediaURLHttps in interface MediaEntitypublic java.lang.String getText()
URLEntity.getURL()getText in interface TweetEntitygetText in interface URLEntitypublic java.lang.String getURL()
public java.lang.String getDisplayURL()
getDisplayURL in interface URLEntitypublic java.lang.String getExpandedURL()
getExpandedURL in interface URLEntitypublic java.util.Map<java.lang.Integer,MediaEntity.Size> getSizes()
MediaEntitygetSizes in interface MediaEntitypublic java.lang.String getType()
getType in interface MediaEntitypublic int getStart()
getStart in interface TweetEntitygetStart in interface URLEntitygetStart in class EntityIndexpublic int getEnd()
getEnd in interface TweetEntitygetEnd in interface URLEntitygetEnd in class EntityIndexpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object