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, setStart
private 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
TwitterException
MediaEntityJSONImpl()
private void addMediaEntitySizeIfNotNull(java.util.Map<java.lang.Integer,MediaEntity.Size> sizes, JSONObject sizesJSON, java.lang.Integer size, java.lang.String key) throws JSONException
JSONException
public long getId()
getId
in interface MediaEntity
public java.lang.String getMediaURL()
getMediaURL
in interface MediaEntity
public java.lang.String getMediaURLHttps()
getMediaURLHttps
in interface MediaEntity
public java.lang.String getText()
URLEntity.getURL()
getText
in interface TweetEntity
getText
in interface URLEntity
public java.lang.String getURL()
public java.lang.String getDisplayURL()
getDisplayURL
in interface URLEntity
public java.lang.String getExpandedURL()
getExpandedURL
in interface URLEntity
public java.util.Map<java.lang.Integer,MediaEntity.Size> getSizes()
MediaEntity
getSizes
in interface MediaEntity
public java.lang.String getType()
getType
in interface MediaEntity
public int getStart()
getStart
in interface TweetEntity
getStart
in interface URLEntity
getStart
in class EntityIndex
public int getEnd()
getEnd
in interface TweetEntity
getEnd
in interface URLEntity
getEnd
in class EntityIndex
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object